473,395 Members | 1,637 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

error: scriptloader.loadscripts cannot be called..........

NawazAhmed
Hi,
I am using visual studio 2008. my project is a web-based project.
I am using ajax toolkit. Getting this error when user click button very fast.
"Sys.InvalidOperationException: ScriptLoader.loadScripts cannot be called while the ScriptLoader is already loading scripts."

After googling I found this solution where u hav to add some javascript code
http://forums.asp.net/t/1173891.aspx
But the thing is I am getting another error after adding this code. i.e. Sys is undefined.
I checked the whole web config file and googled some solutions which says to add some handlers and stuff.....did that by sys error is still there. Its the runtime error.

I also find the solution to make the buttons disabled and the enable after the page loads but that not very practical in my case since I got so many buttons and so many pages.....

Looking forward for a good and quick solution.
Thanks.
Nov 17 '08 #1
5 3437
Plater
7,872 Expert 4TB
Well I don't know what your sis error is, I think it would be the by-product of your attempts to implement workarounds.

You just need to make sure the ajax routines aren't getting called before a previous routine completes.
Seems like setting/checking a simple boolean in the javascript should handle this?
Nov 17 '08 #2
THanks for the reply..
Could u please tell me in detail or provide code for the same...

The sys error is on the sys below which comes from the javascript code as mentioned b4.
Expand|Select|Wrap|Line Numbers
  1. var prm = Sys.WebForms.PageRequestManager.getInstance(); 
  2.  
Nov 17 '08 #3
Plater
7,872 Expert 4TB
That looks like you are sticking .NET code into a javascript section, I don't think that works.

Well if you had a function that handles the ajax requests, and a boolean value:
psuedo code:
Expand|Select|Wrap|Line Numbers
  1. bool CanDoAjax=true;
  2.  
  3. function DoAjax(var ajaxstuff)
  4. {
  5.    if(CanDoAjax)
  6.    {
  7.       CanDoAjax=false;
  8.       //....do all other ajax stuff here
  9.      CanDoAjax=true;
  10.    }
  11. }
  12.  
That's just a real basic rundown, i'm sure it will be a little more complex, but the principal idea should be the same
Nov 17 '08 #4
I never wrote any .net code in this post.....I think u did not get me.
In the previous reply the code is written in javascript...u can c the link below.
the recomended solution which is in javascript
and when I try to implement the above mentioned solution I get error: Sys is Undefined....which is on this line
Expand|Select|Wrap|Line Numbers
  1. var prm = Sys.WebForms.PageRequestManager.getInstance(); 
Nov 18 '08 #5
Don't worry I got it......................
Followed the same link what I provided earlier and the trick was u have to put that javascript code below the script manager tag......not in the head tag.
Thanks 4 all ur help!!!!!
Nov 18 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Racer-D | last post by:
When some of the SQL Server stored procedures I have written are called via my Classic ASP page I have written I get the following error in the cell that is supposed to be retrieving a single...
9
by: Dario | last post by:
This is a technical C++ post regarding the Microsoft runtime error R6025 Pure Virtual Function Call that sometime occurs in programs compiled with Microsoft Visual C++ 6.0. Please consider the...
19
by: Alf P. Steinbach | last post by:
// As usual the error message directs one to the report the bug. // // And as usual there is absolutely no way to do so without paying for // the privilege... // // Or using three or four hours...
5
by: xuatla | last post by:
Hi, I encountered the following compile error of c++ and hope to get your help. test2.cpp: In member function `CTest CTest::operator+=(CTest&)': test2.cpp:79: error: no match for 'operator='...
10
by: Anthony England | last post by:
(sorry for the likely repost, but it is still not showing on my news server and after that much typing, I don't want to lose it) I am considering general error handling routines and have...
10
by: subramanian100in | last post by:
consider the following program: #include <iostream> using namespace std; class my_complex { public: friend ostream & operator<<(ostream &os, const my_complex &c);
3
blazedaces
by: blazedaces | last post by:
Hello, it's been a while since I posted on these forums. My issue I think isn't as much in my code as it's in the syntax and structure in references other packages. I'll get straight to it then: ...
10
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
9
by: Daniel Smedegaard Buus | last post by:
Hey all :) I was wondering about the $error_types (I particularly notice the 's' suffix when reading the manual) parameter for 'set_error_handler()': Can be used to mask the triggering of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.