Hello, friends,
In the source code, there was a JavaScript function isValidInput() for form onsubmit event, i.e., onsubmit="return isValidInput()"
In VS2003, this function was not called when SelectedIndexChanged event in DropDownList boxes was fired.
In VS2008, this function was called when SelectedIndexChanged event in DropDownList boxes was fired.
In either case, DropDownList had property AutoPostBack="true". Therefore,
Before, when a user selected a different list index from DDL, it won't check validation. So, it worked. (It validated inputs only when a user clicked on Send button to submit this form).
Now, when a user selected a different list index from DDL, it WILL check validation. User can go nowhere since **** need more data based on the selected item in DDL. So, now it does work.
If I get rid of isValidInput() function, events are fired as normal.
How to get around this? Any ideas? (This would be a nightmare if we had to rewrite it in VS.net 2008 since it is a pretty big app)
Thanks a lot for your help.
(Modified from Why SelectedIndexChanged event in DropDownList boxes not firing? )
Do you have, or can you add, a Submit button to the form? If so, you can move the isValidInput function to the onclientclick event of this button. That might work for you.
C# <---> VB.Net Translator
MetalAsp.Net:Do you have, or can you add, a Submit button to the form? If so, you can move the isValidInput function to the onclientclick event of this button. That might work for you.
Great! Thanks.
Do you know it works for other non-IE browsers?