Solved

Invalid argument in IE 7

Posted on 2008-06-25
7
750 Views
Last Modified: 2013-11-19
Hi there,

I'm getting an  error when I dynamically write a div with a javascript function call inside it.  The error is only happening with I, FF and Safari seem to be working correctly. If you got to the page in IE and then refresh it or try to close the window the error dialog appears.

http://wellcom.net.au/mynightmare.aspx

What am I missing?

Sean
------ c# code
 

 divThumbs.InnerHtml = String.Concat("<a href=\"#\" onclick=\"mainScreen.LoadServerControlHtml('Management',{'pageID':3,'data':" + xDocList[i].Attributes["id"].InnerText + "},'methodHandlers.BeginRecieve');\" onmouseover=\"setClassName('ctl00_mainContent_" + _docListCnt + "','managmentThumbGlow');\" onmouseout=\"setClassName('ctl00_mainContent_" + _docListCnt + "','managmentThumb');\"><img src=\"images/", xDocList[i].ChildNodes[2].InnerText, "\" border=\"0\" /><a/>");
 
 

-------- actual generated code
 

    <!-- start little thumbs //-->
 

        <div class="plcHolder"><div id="ctl00_mainContent_1" class="managmentThumb"><a href="#" onclick="mainScreen.LoadServerControlHtml('Management',{'pageID':3,'data':5},'methodHandlers.BeginRecieve');" onmouseover="setClassName('ctl00_mainContent_1','managmentThumbGlow');" onmouseout="setClassName('ctl00_mainContent_1','managmentThumb');"><img src="images/ourpeople/Grant-glover.jpg" border="0" /><a/></div><div class="namesText">Wayne Sidwell</div><div class="titleText">Executive Chairman & Chief Executive Officer</div></div><div class="plcHolder"><div id="ctl00_mainContent_2" class="managmentThumb"><a href="#" onclick="mainScreen.LoadServerControlHtml('Management',{'pageID':3,'data':6},'methodHandlers.BeginRecieve');" onmouseover="setClassName('ctl00_mainContent_2','managmentThumbGlow');" onmouseout="setClassName('ctl00_mainContent_2','managmentThumb');"><img src="images/ourpeople/Grant-glover.jpg" border="0" /><a/></div><div class="namesText">Steve Rees</div><div class="titleText">Chief Operating Officer</div></div><div class="plcHolder"><div id="ctl00_mainContent_3" class="managmentThumb"><a href="#" onclick="mainScreen.LoadServerControlHtml('Management',{'pageID':3,'data':7},'methodHandlers.BeginRecieve');" onmouseover="setClassName('ctl00_mainContent_3','managmentThumbGlow');" onmouseout="setClassName('ctl00_mainContent_3','managmentThumb');"><img src="images/ourpeople/Grant-glover.jpg" border="0" /><a/></div><div class="namesText">Kerry Smith</div><div class="titleText">Non Executive Director</div></div>

        <!-- end little thumbs //-->

Open in new window

0
Comment
Question by:MrAgile
  • 4
  • 2
7 Comments
 
LVL 7

Expert Comment

by:ruscomp
ID: 21871445
Looks like it has something to do with AJAX on the page... trying to remove an element?
Is there any AJAX that you have that fires on close?

Maybe someone can interpret better  than I can...
invalidargument.JPG
0
 
LVL 8

Author Comment

by:MrAgile
ID: 21871503
There is a modal dialog that can be opened by clicking on the image. The funny thing is I don't get an error in FF or safari only IE. The error also seems to happen when I refresh the page without doing anything. Am i missing an escape character or something?
0
 
LVL 8

Author Comment

by:MrAgile
ID: 21912260
Anyone ? Can anyone help with this issue?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 7

Accepted Solution

by:
ruscomp earned 500 total points
ID: 21916471
I normally have my debugging turned off for IE7, but have had it on recently and noticed this error on ALOT of sites... May just be an issue with the way IE7 is handling something instead of the code itself...
0
 
LVL 8

Author Comment

by:MrAgile
ID: 21921584
Hi ruscomp,

Why does that not surprise me! I thought it was weird because I was using firebug and that showed no errors at all.

May be I will investigate this error at a later date.

Sean
0
 
LVL 8

Author Closing Comment

by:MrAgile
ID: 31470836
I will turn the script debugger off and it will all be fixed.
0
 

Expert Comment

by:eliuha
ID: 23794585
I do use firebug and it does shows errors

Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.
http://www.callingbanners.com/manager/ScriptResource.axd?d=IOW225tBtJG86MR6ndo4oS_OlCVALkucB3lG5EdVD7sUhRPdXzozhR1gUPNqf473L9hg_yIUDA06q9Xx7fA9IMpplQ6rGT3uzLunQUS1CH81&t=633363104932656250
Line 7069

Does anyone have any idea regarding the solution ?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

911 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now