1

I am using __doPostback of a button control and it will take some time to complete the db operations. I am using it in an update panel and I am getting an issue from IE that it will say Stop running this script.

May I know what is the issue ? I think it may be due to __doPostBack. Previously it is direclty calling the Click Event. Thanks in advance.

2
  • is it triggering the button click handler when you call doPostback() Mar 19, 2012 at 9:52
  • Yes I am calling button click and it will do some db operations
    – kbvishnu
    Mar 19, 2012 at 10:00

2 Answers 2

0

Check your User Agent string. This same thing happened to me one time and I realized it was because I was testing out some pages as "googlebot". The JavaScript that is generated depends on knowing what the user agent is.

From http://support.mozilla.com/tiki-view_forum_thread.php?locale=tr&comments_parentId=160492&forumId=1:

To reset your user agent string type about:config into the location bar and press enter. This brings up a list of preferences. Enter general.useragent into the filter box, this should show a few preferences (probably 4 of them). If any have the status user set, right-click on the preference and choose Reset

1
  • How this solution will help me?
    – kbvishnu
    Mar 19, 2012 at 10:01
0

Avoiding the 'Script taking too long' (all browsers have some form or another of this) message in browsers is relatively simple. You just have to make sure the browser knows you have not created an endless loop or recursion. And the easiest way to do is is to just give the browser a breather in between long running tasks.

have a look at this solution

http://www.picnet.com.au/blogs/Guido/post/2010/03/04/How-to-prevent-Stop-running-this-script-message-in-browsers

3
  • i didn't get anything. can u pls tell me the logic behind it ?
    – kbvishnu
    Mar 19, 2012 at 11:25
  • basically you have to use the javascirpt SetTimeOut function to set a time out on you java-script call(in your case the js that calls the postback) Mar 19, 2012 at 11:29
  • when i added set timeout() then also IE shows the message. What I am doing is from javascript I am calling __doPostback(button,''); . so this will triggers a btnClick defined and it may take time depends on data. Also this things are inside a update panel. This is actually my problem. I got a solution by fixing it using editing registry but it is not practically possible, because we need to use this in all clients who may face this issue.
    – kbvishnu
    Mar 25, 2012 at 2:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.