| | |
Javascript window onload
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: May 2009
Posts: 4
Reputation:
Solved Threads: 1
Here is a sample code:
html Syntax (Toggle Plain Text)
<html> <head> <script type="text/javascript"> function load() { //Put your code here } </script> </head> <body onload="load()"> </body> </html>
Last edited by codestips; May 17th, 2009 at 8:45 am.
The best way to do it:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<html> <head> <title>Test Page</title> <script type="text/javascript">var myFunc = function() { alert("Hello World!"); }; window.onload = myFunc; </script> </head> <body> </body> </html>
•
•
Join Date: May 2009
Posts: 9
Reputation:
Solved Threads: 1
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<html> <head> <script type="text/javascript"> var x=0 function displaymessage() { while (x==0) { x=0 alert("NO!"); } } </script> </head> <body onload="displaymessage()"> <form> </form> </body> </html>
Last edited by Ezzaral; May 21st, 2009 at 1:26 pm. Reason: Added [code] [/code] tags. Please use them to format any code that you post.
![]() |
Similar Threads
- how to reload a page using javascript with out alert (JavaScript / DHTML / AJAX)
- How to call a PHP function from Javascript and return the results back into Javascrip (PHP)
- disable parent window (JavaScript / DHTML / AJAX)
- Fade object using javascript (JavaScript / DHTML / AJAX)
- JAvascript Search Eninge Script (JavaScript / DHTML / AJAX)
- help please ie based javascript problem (JavaScript / DHTML / AJAX)
- Photoshop, Javascript Photo Gallery Help (JavaScript / DHTML / AJAX)
- Javascript breaks IE - please help. (JavaScript / DHTML / AJAX)
- Dynamic Javascript (JavaScript / DHTML / AJAX)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Make Iframe Editable
- Next Thread: Javascript Regular Expression Testing Utility
| Thread Tools | Search this Thread |
acid2 ajax ajaxcode ajaxexample ajaxhelp animate array automatically beta box bug calendar cart checkbox class codes column cookies createrange() css cursor date debugger decimal design dom download dropdown editor element embed enter error explorer firefox focus frameworks getselection google gwt hint html htmlform ie7 iframe images index internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsf jsfile jsp jump listbox maps masterpage math menu microsoft mimic mp4 object onmouseover parent paypal php player position post problem programming progressbar prototype redirect regex runtime safari scale scriptlets search select session shopping size sql text textarea toggle variables w3c website window windowofwords windowsxp wysiwyg \n






