Suppressing the line "Sys.Application.initialize();"

D

dbnetlink

By design ASP.NET AJAX adds the line

Sys.Application.initialize();

to the generated in-line script.

This causing a problem in all browsers except IE whereby my ASP.NET AJAX
control is not initializing properly. If I make a copy of the page source and
then run the code after removing the above line it works perfectly in all
browsers. On investigating the MicrosoftAjax.debug.js file I can see that the
initialize() method is called anyway as it is attached to the window.onload
event. I can see that it should not matter if initialize() is called twice
but in my case it does and I only want to to be called by the window.onload
event and not by the inline call.

My question is can I suppress the insertion of this line ?

The problem also goes away if I put an alert in my "component" initialize
handler so this is obvioulsly some sort of timing issue.

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,148
Messages
2,570,838
Members
47,385
Latest member
Joneswilliam01

Latest Threads

Top