I am trying open a url from a menu option using javascript.
The url's are loaded into the value portion of the menu.
I tried the script: window.open(get("DocPath")); DOCPATH IS THE RECORD ID.
I tried using it in the ONOPTIONSCLICK properity and when that didn't work tried it in the ONCLICK property. Both give me an invalid argument error.
I loaded a url from one of the menu values into a hyperlink widget and the script:
window.open(get("linkid")); works fine.
How do I get this to work from a menu option.
Debug shows the correct url is being loaded into the menu value properities.
Thanks
url from a menu option
-
- New User
- Posts: 12
- Joined: Wed Jan 19, 2011 3:42 pm
- First Name: Roderic
- Last Name: Vosburgh
- Company Name: McGard
- City: Orchard Park
- State / Province: New York
- Zip / Postal Code: 14127
- Country: United States
- Contact:
- David
- Profound Logic Staff Member
- Posts: 690
- Joined: Fri Jan 04, 2008 12:11 pm
- First Name: David
- Last Name: Russo
- Company Name: Profound Logic Software
- Contact:
Re: url from a menu option
Are you referring to the menu widget?
If so, you'll want to use the "onoptionclick" event of the menu widget. A special variable called "value" is available to your script that will have the value of the option clicked. Variable "text" will include the text. See here:
http://www.profoundlogic.com/docs/displ ... %28Menu%29
In your case, assuming the URL is in the menu option value, you could use this:
If so, you'll want to use the "onoptionclick" event of the menu widget. A special variable called "value" is available to your script that will have the value of the option clicked. Variable "text" will include the text. See here:
http://www.profoundlogic.com/docs/displ ... %28Menu%29
In your case, assuming the URL is in the menu option value, you could use this:
Code: Select all
window.open(value);
-
- New User
- Posts: 12
- Joined: Wed Jan 19, 2011 3:42 pm
- First Name: Roderic
- Last Name: Vosburgh
- Company Name: McGard
- City: Orchard Park
- State / Province: New York
- Zip / Postal Code: 14127
- Country: United States
- Contact:
Re: url from a menu option
Thank you, that is what I needed. It's working now.
Who is online
Users browsing this forum: No registered users and 0 guests