views:

499

answers:

1

I am now starting to use Telerik's ASP.NET AJAX controls for 2009 Q1 on my 3.5 web application. IN IE7 (in FF it works fine), whenever I hit a particular page, I get a javascript error stating

"'null' is null or not an object"

Looking this issue up, I have found various people saying it is due to an issue with validators and update panels (using ASP.NET AJAX controls - not Telerik). I am not even using any update panels on this particular page. Has anyone ever encountered this similar issue and come up with any solutions?

Thanks!

+1  A: 

I have discovered what the issue was. I was using jquery's $(document).ready method to interact with properties of several Telerik controls. It seems that when that $(document).ready is fired, Telerik is not fully set up - hence the errors. Now I am completely aware that this is a hack (and will be "unhackified" later), but I simply had the $(document).ready wait a few miliseconds before executing its normal code. It worked like a charm.

Dan Appleyard
I think that you'd better use the ASP.NET AJAX load event (Sys.Application.add_load()) or simply define a pageLoad() function on the page (it is called automatically by MS AJAX). This will ensure that you can interact with the Telerik controls, which are ASP.NET AJAX based and will not need a timeout hack to work.
lingvomir
I changed it to use pageLoad and it works now. Thanks lingvomir, why don't you put in an answer so I can upvote it.
Dan Appleyard
yes, lingvomir you should add that as an answer. That is the only documented way of waiting for ASP.NET AJAX controls (including telerik controls) to be ready.
Roatin Marth