|
|
Subject:
run javascript on page load
Category: Computers Asked by: deathland-ga List Price: $2.00 |
Posted:
03 Jan 2006 22:14 PST
Expires: 02 Feb 2006 22:14 PST Question ID: 428814 |
How to run javascript on page load? |
|
There is no answer at this time. |
|
Subject:
Re: run javascript on page load
From: document123-ga on 04 Jan 2006 03:04 PST |
You need add an OnLoad event to the HTML body tag. This URL should help. http://www.htmlcodetutorial.com/document/index_attsupp_1.html |
Subject:
Re: run javascript on page load
From: larkas-ga on 05 Jan 2006 00:21 PST |
Do you have access to make changes to the page source on the server? If so, add an onload event. If you do not have access and still want to run Javascript when the page loads locally, you should use the Greasemonkey extension in Firefox or something like it in IE (see: http://greasemonkey.mozdev.org (Firefox) http://www.daishar.com/blog/archives/2005/03/greasemonkey_fo.html (IE)) |
Subject:
Re: run javascript on page load
From: vijaypangam-ga on 09 Jan 2006 03:20 PST |
in the body take use onload event eg. <body onload="yourfunction()"> |
Subject:
Re: run javascript on page load
From: vijaypangam-ga on 09 Jan 2006 03:20 PST |
in the body tag use onload event eg. <body onload="yourfunction()"> |
Subject:
run javascript on page load
From: matiasbaruchinsaurra-ga on 13 Jan 2006 15:48 PST |
You must write directly, like: <script> your script </script> so it will load directly when the page loads. But if you put: <script> function (name) your script </script> so you must put a button for example. onClick="function(name)" I wish my HELP HELPS YOU! |
Subject:
Re: run javascript on page load
From: idani-ga on 13 Jan 2006 18:37 PST |
Running JS on page load is simple. onload event on body tags will do the trick. exmple: <body onload="alert('Hello!');"> You can use onunload events and onbeforeunload to get JS run on page unloaded. More information at: http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onload.asp |
Subject:
Re: run javascript on page load
From: quinny61994-ga on 14 Jan 2006 08:00 PST |
If you want to use Javascript in... Microsoft Word/Frontpage - You can use macros in the script processor by going to Tools>Macro>Microsoft Script Editor. That should work. Free Webhost - Webhosts will usually have a clear tab at the top of the page editor that says either "Plain Text" or "HTML". Click on HTML and copy/paste your javascript. In Freewebs.com you have to click on the button on the toolbar in webs edit that looks like this : < > ... and when you click it it says type your custom HTML code in here. Thanks, Quinny61994 |
Subject:
Re: run javascript on page load
From: kriskatakam-ga on 24 Jan 2006 22:34 PST |
Hi this the way you can run a script when a page gets loaded <html> <head> <script language="javascript"> function funcToCall() { alert('called'); } </script> </head> <body onload="funcToCall()"> </body> </html> |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |