Javascript error is stopping __doPostBack working

M

Mike Owen

Postback suddenly stopped working on my web page, where previous it had been working fine.

The error message "Expected ';' on line number 380" is shown to occur during page load, which I found by changing the 'SymError' function as below:

<script language="JavaScript">
<!--
function SymError(msg, url, linenumber){
alert('Error message= '+msg+'\nURL= '+url+'\nLine Number= '+linenumber);
alert("system error");
return true;
}
window.onerror = SymError;
//-->
</script>


The automatically generated line: theform = document.WebShopProductDetails:_ctl0:form1;

in the following automatically produced __doPostBack function is producing the error.....anybody got any ideas firstly why the script is being generated with an error, and secondly what the error is as everything looks fine to me?


<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
theform = document.forms["WebShopProductDetails:_ctl0:form1"];
}
else {
theform = document.WebShopProductDetails:_ctl0:form1;
alert("gets here!");
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top