Javascript In Line with the menu items.

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
david@hopkinsherald.com
Beginner
Beginner
Posts: 1
Joined: Wed Jan 03, 2007 11:49 pm

Javascript In Line with the menu items.

Post by david@hopkinsherald.com »

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: Select all

onclick="javascript:window.clipboardData.setData('Text','text_i_want_copied');location.href="http://websites.milonic.com/microsoft.com';"
My current menu element looks like this:

Code: Select all

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: Select all

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.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

Well, I'm not a js person, but you have an error in the url= part, that is it should be

Code: Select all

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
Post Reply