jquery validate not working in IE - solution

PurpleEdge

Hi Bernd,

Nice thought, but unfortunately wrong  :wink:

It is the missing "value" that causes the error.

In HTML the option tag has no closing tag, but I guess it is time I started using xhtml  :-)

Regards,
Geoff B

BerndJM

Hi,

no idea where you've learned that coding ;-)
but I'll bet, if you use a correct html syntax it will even work in IE without the need of setting a value ...


<select name="top5" size="3">
     <option>Heino</option>
     <option>Michael Jackson</option>
     <option>Tom Waits</option>
     <option>Nina Hagen</option>
     <option>Marianne Rosenberg</option>
   </select>



Regards Bernd
In theory, there is no difference between theory and practice. But, in practice, there is.

PurpleEdge

I discovered today that one of my forms that uses jquery validation wasn't validating in Internet Explorer!

The validation worked fine when the form was used to insert a new record, but the submit button went straight to the next procedure when the same form was used to edit a record. It worked fine in Firefox.

After a couple of hours fiddling with the validation code, I narrowed the problem down to a SELECT control. I had formatted the select option as...

<select name="suburb" title="Your business must be located in one of these suburbs">
<option value = ''/>***NONE***
<option />AKUNA BAY
<option />ALLAMBIE
<option />ALLAMBIE HEIGHTS

IOW I hadn't specified a "VALUE" for each option - this completely broke the jquery validation for the whole form!

Changing the options to...

<select name="suburb" title="Your business must be located in one of these suburbs">
<option value = ''/>***NONE***
<option value='AKUNA BAY' />AKUNA BAY
<option value='ALLAMBIE' />ALLAMBIE
<option value='ALLAMBIE HEIGHTS' />ALLAMBIE HEIGHTS

...fixed it.

Thought I'd pass it on to others for possible future reference.