
running custom javascript from the menu
running custom javascript from the menu
Is this possible to get these scripts to run when the item is clicked? The situation is that there are some sections of the website I am working on that require a disclaimer to be accepted before moving on to the restricted content (no, this is not a porn site!
). The disclaimer is in the form of a popup window, using javascript. However, the function is being run as soon as the menu finishes loading Is there a way activate the function by a click? Thanks.

--Kris
vlaad@sonic.net
vlaad@sonic.net
Here is an example of executing a javascript when clicking on a menu item, that pops up a new window in this case called "news.htm"
,"News","javascript:openNewWindow(\"news.htm\",310,350,\"scrollbars=yes\")
When clicking on the menu item "NEWS", the javascript function "openNewWindow" is executed, passing the parameters which the function requires. Below is a copy of the function.
I realize this is not exactly what you are asking for, but thought it might get you started in the right direction.
function openNewWindow(winURL,winWidth,winHeight,winConfig)
{
mmConfig=""
mmConfig="width="+winWidth+","
mmConfig+="height="+winHeight+","
mmConfig+=winConfig
var mmWin=open(winURL,"",mmConfig);
mmWin.focus();
}//-->
,"News","javascript:openNewWindow(\"news.htm\",310,350,\"scrollbars=yes\")
When clicking on the menu item "NEWS", the javascript function "openNewWindow" is executed, passing the parameters which the function requires. Below is a copy of the function.
I realize this is not exactly what you are asking for, but thought it might get you started in the right direction.
function openNewWindow(winURL,winWidth,winHeight,winConfig)
{
mmConfig=""
mmConfig="width="+winWidth+","
mmConfig+="height="+winHeight+","
mmConfig+=winConfig
var mmWin=open(winURL,"",mmConfig);
mmWin.focus();
}//-->
thanks
thanks for the help... funny thing is i figured it out about an hour after i posted. figures! 

--Kris
vlaad@sonic.net
vlaad@sonic.net