Jonida Cuko

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromJonida Cuko
ToMe
Subjectproblem with validating form-elements that are created and filled dynamically
Date20 April 2005 17:14
i have a problem in netscape and mozilla.

i have a form that is created dynamically reading from one table in db. i
have many tables from wich i can choose. and in the element of the form i
add a property valid='x,x,x,x,x', where may be 0 or 1, and this tells the
javascript that validate the submit of the form that the element is
required or not, is email adrress, is date and so one.

par example <input type=text name=email value="" valid="1,1,0,0,0"> -> this
element is required and must be email.

and all this is ok in explorer, but i have javascript error in netscape and
moxilla.

can you suggest me, e solution for that.

i dont know with how and what element the form is filled and have not rules
for validating, apart that not native atribut that i have added.

thankuy in advance
FromMe
ToJonida Cuko
SubjectRe: problem with validating form-elements that are created and filled dynamically
Date20 April 2005 17:32
Jonida,

> par example <input type=text name=email value="" valid="1,1,0,0,0">

how do you try to get the value of the attribute? do you use getAttribute ?
This is the correct way to do it, and will work in all current browsers.

> and all this is ok in explorer, but i have javascript error in netscape
> and moxilla.

What is the error message? (Look in the tools menu for the javascript
console)

What do other standards compliant browsers like Opera, Safari or Konqueror
say?

Do you have a page where I could see this failing?


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.