views:

451

answers:

2

Hi,

I'm hoping someone on this list can offer some help. I have a page that uses ajax to loads a form (id: "editform") into a jQuery-ui dialog box. The dialog box has a button attached - when someone changes the form and clicks this button it triggers a function which serializes() the data and sends via $.post to replace a div on the page with the results. This works fine in every browser I've tested on except...wait for it...IE (all versions). The problem seems to be that IE is not recognizing the call to serialize this form.

alert($("#editform").serialize();

gives me "" in IE, but the desired long querystring in other browsers. I've also tried to grab the data one piece at a time,

alert($("#name").val());

Again - IE does not recognize this field, returning "" while the other browsers output the data I'm looking for.

Any ideas?

Thanks

+1  A: 

Is this a typo in here, or also in your code:

alert($("#editform").serialize();

See the missing ). It should be:

alert($("#editform").serialize());
Donny Kurnia
Sorry for the confusion - that was just a typo here - not a copy/paste job. I've been using the correct code, which works in non-IE browsers.
Zeth
A: 

Okay - I found it. Thanks, Brandon H. for pointing me to the HTML - I hadn't closed the form () in the generated HTML, which was apparently tripping up IE. I got it up and running now.

Thanks all for your time.

Zeth