Board index » Web Programming » stop javascript from executing when the page loads?
|
dragonlady2264
|
|
dragonlady2264
|
stop javascript from executing when the page loads?
Web Programming278
Hello All, I have a web page that has a link on it to display a JavaScript popup. </body> <script language="JavaScript1.2" src="popupmsg.js"></script> <script language="JavaScript1.2" src="cpw.js"></script> Is there a way to make this JavaScript not execute when the page loads? I want the popup to display when the link is depressed only. Thanks for any ideas MMJII - |
| Steve
Registered User |
Fri Sep 26 17:46:47 CDT 2003
Re:stop javascript from executing when the page loads?
Place a function call at the very beginning of
the "main" js file, such as: function On() and then in your hyperlink add: onmousedown="On()" The the script "shouldn't" fire until the function is "called" by the mouse click -- using 2k PRO but....95isalive This site is best viewed............ .......................with a computer "MMJII" <macjohnson@angelojohnson.com>wrote in message QuoteHello All, - |
| Thomas
Registered User |
Fri Sep 26 17:58:30 CDT 2003
Re:stop javascript from executing when the page loads?
Check your <body>tag for a onload statement, then remove.
-- ============================================== Thomas A. Rowe (Microsoft MVP - FrontPage) WEBMASTER Resources(tm) www.ycoln-resources.com">www.ycoln-resources.com FrontPage Resources, Forums, WebCircle, MS KB Quick Links, etc. ============================================== To assist you in getting the best answers for FrontPage support see: www.net-sites.com/sitebuilder/newsgroups.asp">www.net-sites.com/sitebuilder/newsgroups.asp "MMJII" <macjohnson@angelojohnson.com>wrote in message QuoteHello All, - |
| MMJII
Registered User |
Tue Oct 14 10:09:16 CDT 2003
Re:stop javascript from executing when the page loads?
Thank you for your time & knowledge
MMJ II "MMJII" <macjohnson@angelojohnson.com>wrote in message QuoteHello All, - |
