views:

343

answers:

4

when i am going through my project in IE only its showing errors

A runtime error has occurred Do you wish to debug?

Line 768 Error:Expected')'

Is this is regarding any script error

+1  A: 

Yes, it looks like you have a javascript syntax error. Check unclosed paranthesis and unclosed string literals in your client script blocks.

Canavar
means in that line 768,,i think let me check
peter
It may not be in the line 768. sometimes it throws errors near the line it warns. because your other paranthesises covers the expected one. check the possible methods you newly added.
Canavar
Or click debug at the debug message, and select Visual studio in the list. it shows you the position of the error.
Canavar
but i didnt find any script in that page
peter
do you have external js files attached to page ?
Canavar
we used two pages that js files like <script type="text/javascript" src="../Includes/JS/jquery-1.2.6-vsdoc.js"></script> <script type="text/javascript" src="../Includes/JS/jquery-1.2.6.js"></script>.....etc
peter
yes 6 js files are using,,how to know that which one is producing problems
peter
Click OK when it asks you if you want to debug. and in the list select Visual Studio. it will place the cursor to the line that produce error.
Canavar
thank you,for the information
peter
A: 

This might be helpful for javascript debugging in Internet Explorer.

Bogdan Constantinescu
A: 

use firefox + firebug , your JS errors will be a thing of the past ;)

Rick J
means we can see js from firebug addons
peter
Yes, FireBug is great!
Jon
A: 

One of the common reasons for this could be the unescaped quotes inside the string parameter of javascript handler, such as:

onmouseover='myJavascriptFun("my so called "parameter"")'

For some reason IE unlike for example FF unescapes quotes before parsing javascript, so the code above becomes

onmouseover='myJavascriptFun("my so called "parameter"")'

so the ')' is expected after the second ".

The parameter, of course, comes from a data source so it should have been escaped using htmlentities or such method.

tishma