Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:43

Javascript included in a menu link.


Poster: jnewton
Dated: Thursday February 12 2004 - 14:51:44 GMT

I need to have an alert() pop up and warm people when they are leaving the secure network and when they click "ok" it will continue with the transfer.

It is simple to do in html -

<A href="link" onClick=alert('warning')">Link description</a>

I've just not ben able to figure it out how to get this to work in the menu.

Thank,

John
USCG, MLCA


Poster: jnewton
Dated: Thursday February 12 2004 - 19:12:46 GMT

Well, I got a little industries and developed a simple function that can be called to do what I want.

function notice(url)
{
alert('Links from this page to non-Coast Guard sites are provided as a customer service and do not represent any implicit or explicit endorsement by the United States Coast Guard of any commercial or private issues or products presented there.');
outsideWindow = window.open(url);
outsideWindow.focus();
}

Then in the menu I set url=javascript:notice('the link');

It displays the required disclamier and then opens the link in a new window.

Like to see it


Poster: rudy
Dated: Friday February 13 2004 - 2:21:52 GMT

Can you give your URL? Would like to see this in action. I could use something like that on my Web site. :D