'Sys' is undefined
-
Hi Friends! I developed a website in asp.net using c#, I created a master page and using it in all other pages. I also have some javascript functions in content page but there is no AJAX control or any kind of control related to AJAX. But someimes, specially when I send user to 'Home' page from another page then I get this stupid javascript error 'Sys is undefined' but when I refresh the page then there is no error. If anyone of you knows about it please tell me how can I fix it? Waiting for your reply, Kind Regards, Abubakar
-
Hi Friends! I developed a website in asp.net using c#, I created a master page and using it in all other pages. I also have some javascript functions in content page but there is no AJAX control or any kind of control related to AJAX. But someimes, specially when I send user to 'Home' page from another page then I get this stupid javascript error 'Sys is undefined' but when I refresh the page then there is no error. If anyone of you knows about it please tell me how can I fix it? Waiting for your reply, Kind Regards, Abubakar
Sys is defined in the Microsoft AJAX Library, therefore I assume that there has to be any kind of a AJAX control on your site or at least some JavaScript that references Sys. I suggest that you take Firefox with the Web Developer Add-on and when you encounter the error then have a look a all JavaScript that is loaded for the page and look for the reference to Sys. Maybe this way you can find the reason.
-^-^-^-^-^- no risk no funk
-
Sys is defined in the Microsoft AJAX Library, therefore I assume that there has to be any kind of a AJAX control on your site or at least some JavaScript that references Sys. I suggest that you take Firefox with the Web Developer Add-on and when you encounter the error then have a look a all JavaScript that is loaded for the page and look for the reference to Sys. Maybe this way you can find the reason.
-^-^-^-^-^- no risk no funk
Ya Enzler, You are right, I just remember that as we are calling a webservice in javascript so we are using 'Sys' in a .js file. Here is the code which we are using for that; PPMService.registerClass('PPMService',Sys.Net.WebServiceProxy); Will u please tell me what should I do? I have noticed one thing more that if ur page remains untouch for some time then it also gives same error. Plz suggest a solution. Regards, Abubakar
-
Ya Enzler, You are right, I just remember that as we are calling a webservice in javascript so we are using 'Sys' in a .js file. Here is the code which we are using for that; PPMService.registerClass('PPMService',Sys.Net.WebServiceProxy); Will u please tell me what should I do? I have noticed one thing more that if ur page remains untouch for some time then it also gives same error. Plz suggest a solution. Regards, Abubakar
A simple solution - but not necessarily the right one - is to add a ScriptManager (from ASP.NET AJAX) to the master page. Then the needed js files are registered on the client.
-^-^-^-^-^- no risk no funk
-
A simple solution - but not necessarily the right one - is to add a ScriptManager (from ASP.NET AJAX) to the master page. Then the needed js files are registered on the client.
-^-^-^-^-^- no risk no funk
The problem is I am relatively new here in asp.net 2.0 and I didn't develop project, I am just fixing bugs. I have found this in masterpage; but I could not find definiation of 'ScriptManager1'. Will u please tell me how can I add a ScriptManager in masterpage?
-
The problem is I am relatively new here in asp.net 2.0 and I didn't develop project, I am just fixing bugs. I have found this in masterpage; but I could not find definiation of 'ScriptManager1'. Will u please tell me how can I add a ScriptManager in masterpage?
Ask someone of your development team or look at http://ajax.asp.net. Basically drag and drop the ScriptManager from the Toolbar onto the design view of the Master page.
-^-^-^-^-^- no risk no funk
-
Ask someone of your development team or look at http://ajax.asp.net. Basically drag and drop the ScriptManager from the Toolbar onto the design view of the Master page.
-^-^-^-^-^- no risk no funk
This is the main problem that we all are a new development team. The guy who developed it is in Israel and on vocations. ScriptManager is already there in masterpage. I also added following line in tag under web.config But still no difference. If I page remains untouched for some time or another page sends user to 'Home' page then I get this stupid javascript error. I am really tired with it and still looking for a solution. Abubakar