Jump to content

onload event for <div> tag?


Zaper Gallis

Recommended Posts

I'm making a script that starts out in a login page. once you click enter it uses Ajax to replace the log in with a display that then uses Ajax to load messages inside that display every second. The issue is because the display is loaded after the body tag i cannot use the onload event to fire the function, nor do i want the user to have to click something to load the display. is there a equivalent to the onload function that can be placed inside a <div> or <table> to start the function?

Link to comment
Share on other sites

Placing a script immediately inside or after the element that you want to load will make it run as soon as the element is added to the DOM.I'm not sure if I understood correctly, but you shouldn't have anything outside of the body tag.

Link to comment
Share on other sites

Placing a script immediately inside or after the element that you want to load will make it run as soon as the element is added to the DOM.I'm not sure if I understood correctly, but you shouldn't have anything outside of the body tag.
I didn';t mean out side the body tags, but i meant out side the <body> opening. Thanks.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...