rcpilot
Posts: 2
|
Posted: 11/25/2008, 1:57 PM |
|
After digging around a bit trying to figure out the root cause of why the Update Panel stops working right when you use the 'onchange' event to submit a form I found this solution.
http://www.robertnyman.com/2008/02/29/the-form-that-left/
Basically what it comes down to is that the javascript submit() function automatically overwrites everything the Update Panel uses for its 'onsubmit' event. If you're like me and you know that you'll need to call 'onsubmit' you can just straight up replace this (the code CCS writes when you add an onchange submit action):
document.forms["formname"].submit();
with this:
document.forms["formname"].onsubmit();
If you want the dual functionality of checking whether or not there's already an onsubmit event, then you'll want to read more in depth (in the comments really) within that link above.
|
|
|
|