SV: [thelist] JS: onSubmit function seems to reset Select input?
Marcus Andersson
marcan at home.se
Fri Nov 14 17:30:25 CST 2003
> When I go to the first table row, and change the "Change
> status to:" select to "Confirmed", and then click Submit,
> suddenly the select gets reset to "Deleted". This didn't
> happen before I added an onSubmit handler to the <form> tag..
> Is this expected behavior?
Ehhh, no. It's not expected behaviour.
>Any way around it? It only has to work in IE (intranet project).
The fix is very easy and it's all depending on a javascript bug. On line
43 in function TestDeletion you do an assignment (one =) in the if
statement instead of an equality check (two ==)
Change the line to
if (document.forms[f].WhatToDo.selectedIndex == 4)
and it should work as expected
/Marcus
More information about the thelist
mailing list