Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- getting a global variable to update every setInterval call


cybernoob - 5:22 pm on May 4, 2012 (gmt 0)


thanks for all your help! though i have a question on some of the code you guys used...

(1)window.addEventListener?
(2)window.addEventListener('load',init,false):
(3)window.attachEvent('onload',init);


1.what does the question mark mean?

2 and 3. i understand that init is invoked once the document loads ie it would be the same as <body onload="init()"> which i have been taught to use(3) but im not sure what (2) means...

and thanks again, i couldnt believe how many responses ive gotten since this morning, and how detailed and helpful theyve been to help me become better with js!


Thread source:: http://www.webmasterworld.com/javascript/4449318.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com