Solved

IE9 JavaScript error when trying to execute method to click button on parent window form: Error: Sys.ParameterCountException: Parameter count mismatch.

Posted on 2013-01-24
2
1,968 Views
Last Modified: 2013-01-25
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.ctl00$CPHmain$FormView1$btnRefreshForm.click();

In IE9, it is giving the following error:
Error: Sys.ParameterCountException: 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.
0
Comment
Question by:dwoolley3
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 22

Accepted Solution

by:
Mrunal earned 500 total points
ID: 38817631
0
 

Author Closing Comment

by:dwoolley3
ID: 38818764
I had seen the first link previously, as I researched the issue, but I did not want to change the ScriptMode="Release" for the ScriptManager since the ScriptManager was declared in a MasterPage that would be used by all pages in my web site and not just the ones having an issue due to my use of this special click() command.

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.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question