views:

39

answers:

1

Hello,

I'm using HTML & ASP Classic. Does someone knows if there is something like "After Load" event?

Thanks

+1  A: 

There are several options, depending on what you need to do.

On the client side, if you are using javascript, you can use the OnLoad event that will fire once the page has finished loading. This is commonly done on the <body> tag and calls a javascript function of your choice:

<body onload="myFunction();">

If you are using a javascript library like jQuery, it has some built in functionality that helps with this.

If you are looking for a server side event that will tell you that the page has finished loading, there is no such event (classic or asp.net). One way to emulate such a thing would be by using a javascript function to make an http request (using XMLHttpRequest) to the server to let it know the page has finished loading.

Oded
The onload event fires after all the page is loaded?
Yes. After all static content has finished loading.
Oded
Then I'm probably missing something...this is the case; I have on the html file a XML tag: <xml id="xml1" OnCellChange="DoSomething()" </xml>.The problem is that the function DoSomething() is called before any cell was changed.....So I wanted to reverse waht DoSomething() does, after the page loads.
@user181421 - The `<xml>` tag is not part of the HTML specification, and as such HTML does not have a `OnCellChange` event defined on it. I wouldn't expect it to work.
Oded
http://support.microsoft.com/kb/262610
@user181421 - This makes it an IE XML and Javascript issue, not classic asp or html.
Oded
@user181421 - how do you populate the XML island? If you do so in script, then I would expect the event to get fired.
Oded