1

I have referenced this existing query here regarding jQuery $(document).ready? and UpdatePanels

I am getting a Javascript error on line...

var prm = Sys.WebForms.PageRequestManager.getInstance();

The error is :

Microsoft JScript runtime error: 'Sys' is undefined

Any resolution for this? What could I be missing?

Community
  • 1
  • 1
Julius A
  • 38,062
  • 26
  • 74
  • 96

3 Answers3

2

Taking this a step further from what Paperjam wrote.

var prm;

$(document).ready(function(){
    prm = Sys.WebForms.PageRequestManager.getInstance();
});

That will avoid trying to reference Sys before it exists. If that doesn't work it could be something else entirely.

hunter
  • 62,308
  • 19
  • 113
  • 113
  • You'll probably need to do something like this also, to prevent $ clash between ASP.NET Ajax and jQeury var $j = jQuery.noConflict(); – epitka Feb 08 '10 at 19:07
0

Make sure the ASP.NET ScriptManager control is above your Javascript. It could very easily be that you're calling Sys.WebForms.PageRequestManager before it's been loaded.

Chad Levy
  • 10,032
  • 7
  • 41
  • 69
0

Make sure your page contains the following:

<asp:scriptmanager runat="server" />
Naeem Sarfraz
  • 7,360
  • 5
  • 37
  • 63