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:45

Javascript In Line with the menu items.


Poster: david __at__ hopkinsherald.com
Dated: Wednesday January 3 2007 - 23:01:54 GMT

Hello all,

I have a need to place a JS copy command inline with a menu item, but I can't seem to get it to funtion like id hoped.

Here's the deal.

When a user clicks on a menu item it opens a form. I'd like to have an email address posted to the clip board upon entering the form so that they will have it handy to fill out the form.

In JS the code works great and looks like this:

Code:
onclick="javascript:window.clipboardData.setData('Text','text_i_want_copied');location.href='http://www.microsoft.com';"


My current menu element looks like this:

Code:
aI("text=Activity Log;url=http://forms.cgaux.org/email/a7029s.pdf);


I have tried adding the JS to the front of the url like this:

Code:
url=url=javascript:window.clipboardData.setData('Text','text_I_want_copied');http://forms.cgaux.org/email/a7029s.pdf


I've tried several other options as well..

Any assistance would be greatly appreciated.

David.


Poster: Ruth
Dated: Thursday January 4 2007 - 6:49:07 GMT

Hi,

Well, I'm not a js person, but you have an error in the url= part, that is it should be
Code:
url=javascript:window.clipboardData.setData('Text','text_I_want_copied');http://forms.cgaux.org/email/a7029s.pdf;");
when I click that here on my desktop I get a page that says true.

Ruth