On Oct 25, 12:06 am, ram <sriva...@gmail.com> wrote:
> This works fine in chrome and firefox but does not in IE6. i am yet to
> try it out in IE 7. As you can see, i have an input field and when
> user enters a value and clicks on Save, Jquery $("span.saveLink").click
> (function() gets invoked which populates the SaveUserForm(pls note my
> input field is outside and its not enclosed in a form). The issue is,
> form gets submitted but except isNew set to 0 or 1, all other fields
> in Struts action show ""(empty string)  when i do this in IE6 where as
> in Chrome and Firefox, form values get populated correctly in Struts.
> Action. I tried Firebug and did not complain of any javascript errors.
> What am i doing wrong? Please respond quickly as testing is blocked.
>
> I tried to replace
>         $("form#saveUserForm input#userGuid").val(id);

Why wouldn't you use:

        $("#userGuid").val(id);


>                 $("form#saveUserForm input#amount").val(value);
>                 $("form#saveUserForm input#totalAvailableStorage").val
> (totalAvailableStorage);
> with
> document.saveUserForm.userGuid=id;
> document.saveUserForm.amount=id;
> document.saveUserForm. totalAvailableStorage =id;
>
> but IE6 complains that those properties are undefined.

The syntax you have used only works in IE if saveUserForm is the
form's name, not its ID.  Either change the attribute to the name, add
a name attribute with the same value or use the following:

  document.forms['saveUserForm'].elements['userGuid'].value = ...;


--
Rob

Reply via email to