Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Javascript error is stopping __doPostBack working

Reply
Thread Tools

Javascript error is stopping __doPostBack working

 
 
Mike Owen
Guest
Posts: n/a
 
      06-15-2004
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("n etscape") > -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>

 
Reply With Quote
 
 
 
 
Mike Owen
Guest
Posts: n/a
 
      06-16-2004
I have found the answer to my problem!

It is a bug in the .Net 1.1 framework code, as in the following article:

http://support.microsoft.com/default...b;EN-US;818803

But I managed to download and successfully install the fix on my 2000 server from:

http://support.instantasp.co.uk/shwm...&messageid=654

I hope that this helps others!



"Mike Owen" wrote:

> 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("n etscape") > -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>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
__doPostBack and Response.direct not working in non-framed pages. =?Utf-8?B?Q2xhcw==?= ASP .Net 0 11-10-2005 01:35 PM
call __doPostBack from javascript method not working as expected SteveSu ASP .Net 2 11-08-2005 07:03 AM
__doPostBack Error -- Javascript Murray Patrick via DotNetMonster.com ASP .Net 1 02-11-2005 08:20 AM
__dopostback javascript problem Fredrik Elestedt ASP .Net 3 04-23-2004 12:31 AM
javascript:__doPostBack error Nikhil Patel ASP .Net 3 02-26-2004 10:15 PM



Advertisments