Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JavaScript error in IE

Status
Not open for further replies.

khue

Programmer
Mar 6, 2001
112
0
0
US
I have a link to a new page and each time when I click on this link it tells me that the page has loaded but have javascript error. I have a HTML and JavaScript Validator but it doesn't give me any syntax error either. Also, within this same page, there is a button when clicked, it opens a new window. This new window can be closed due to the above javascript error.

These javascript error only occurs in IE not Netscape.

Can someone help me on how to narrow down the javascript error that my HTML and Javascript Validator can find?
 
you should be more precise if you want some help ! send some code (please NOT the whole html page !!!!!!!!! only the RELEVANT parts of it !) - copy/past the error returned by your validator ...
 
There is no error code generated by the Validator. When clicking the link, in the status bar it shows: "done but with javascript error."

The only script I have in the page is:

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!-- Hide from old browser

// Purpose: Open a new window.
function openSRA(ContextID, TrialID, SectionID, CourseID)
{
url = &quot;/CommunityEd/Teachers/sra.cfm?ContextID=&quot; + ContextID + &quot;&TrialID=&quot; + TrialID + &quot;&SectionID=&quot; + SectionID + &quot;&CourseID=&quot; + CourseID;
sraWindow=window.open(url);
}
// -->
</SCRIPT>
 
To narrow it down - get the line number of the error - then you can see where exactly it stumbles by putting in an alert. As soon as the alert doesn't appear, you have your error. It is strange that IE is having problems, normally it is the poor excuse spitting the dummy.
b[sup]2[/sup] - benbiddington@surf4nix.com
 
Did that and all the alert showed up but still the same problem. In the status bar, still get the message, &quot;done but with Javascript error in page.&quot;
 
Can I see the code where you call the function? I would guess this is where your problem lies (I copied your function into a test page and used an onclick command in IE and it worked just fine).

Matt H.
 
Double-click the error in the status bar - and it will tell you what the error is - or give you a hint anyway.
b[sup]2[/sup] - benbiddington@surf4nix.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top