dwoolley3
asked on
IE9 JavaScript error when trying to execute method to click button on parent window form: Error: Sys.ParameterCountException: Parameter count mismatch.
My code worked fine when running IE8, but now it causes an error when running on IE9.
From an ASP.NET page that uses an AJAX Update panel, I open a new window. The new child page also uses an AJAX Update panel. From the child page, the user can close the child window by clicking a link to close it (which is outside the Update panel), which then executes a JavaScript routine to click a button on the parent form:
window.opener.aspnetForm.c tl00$CPHma in$FormVie w1$btnRefr eshForm.cl ick();
In IE9, it is giving the following error:
Error: Sys.ParameterCountExceptio n: Parameter count mismatch.
Also, this is only happenning when I run it from Visual Studio 2008 (in my development environment), but it is fine when running on the Test machine.
Are there some parameters missing from the click() ? What can be done to get this to work in my development environment? Again, it worked fine in IE8.
From an ASP.NET page that uses an AJAX Update panel, I open a new window. The new child page also uses an AJAX Update panel. From the child page, the user can close the child window by clicking a link to close it (which is outside the Update panel), which then executes a JavaScript routine to click a button on the parent form:
window.opener.aspnetForm.c
In IE9, it is giving the following error:
Error: Sys.ParameterCountExceptio
Also, this is only happenning when I run it from Visual Studio 2008 (in my development environment), but it is fine when running on the Test machine.
Are there some parameters missing from the click() ? What can be done to get this to work in my development environment? Again, it worked fine in IE8.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Anyway, with the re-emphasis given for this solution, I added ScriptMode="Release" and I no longer had an issue in Development mode:
<asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Release">
My concern was that I might not be able to "debug" the JavaScript in Development mode by changing the ScriptMode, but I am still able to follow the code step-by-step via Visual Studio 2008 in Debug mode. Perhaps other capabilities of debugging are disabled, which do not impact the kind of debugging I currently do in development. I am fine with this change and trust that it will be fine in production for all other pages that use the MasterPage (Actually, they might even have slightly better performance with ScriptMode="Release"). Thanks.