i have this link on my site that goes <a href="#" onClick="window.external.AddFavorite(window.location,document.title)">Bookmark Page</a>
so now i wanna put this in the menu. how?
(btw i dunno js)
Using "#" and the onClick
To add it to the menu, use the following line.
,"SetBookmark","javascript:window.external.AddFavorite(window.location,document.title) onbordercolor=ff0000;offbordercolor=FFFFFF;",,"StatusBarText",0
Basically in the URL section you are putting a call to the javascript function, instead of using the onClick event handler.
Hope this helps!
,"SetBookmark","javascript:window.external.AddFavorite(window.location,document.title) onbordercolor=ff0000;offbordercolor=FFFFFF;",,"StatusBarText",0
Basically in the URL section you are putting a call to the javascript function, instead of using the onClick event handler.
Hope this helps!
Dave Hergert
Software Engineer
"Helping to make the menu better, one at a time."
Software Engineer
"Helping to make the menu better, one at a time."
Sure, I dont see what not. Just enclose those values in single quotes. It would look something like
But no single quotes or aposterphies (sp?) inside the names though...ok. If this doesnt work, there is one last thing you can do that will definetly work.
Code: Select all
,"SetBookmark","javascript:window.external.AddFavorite('page.html','My Great Page') onbordercolor=ff0000;offbordercolor=FFFFFF;",,"StatusBarText",0
Dave Hergert
Software Engineer
"Helping to make the menu better, one at a time."
Software Engineer
"Helping to make the menu better, one at a time."
It goes wrong on the quotes.
works fine, but does not. A workaround might be to call a method, that does the job, like and define the method in your menu definition file, like
Code: Select all
javascript:window.external.AddFavorite(window.location,document.title)
Code: Select all
javascript:window.external.AddFavorite('page.html','My Great Page')
Code: Select all
javascript:addMyFavorite()
Code: Select all
function addMyFavorite() { window.external.AddFavorite('page.html','My Great Page');}
I actually thought about that, but I thought that if this person wanted to have this type of thing in a couple different menu items, that would mean defining an entire function just for each menu item. Theres no real dynamic ability there. But if this person only is going to use this once in a page, then its the perfect solution.
Dave Hergert
Software Engineer
"Helping to make the menu better, one at a time."
Software Engineer
"Helping to make the menu better, one at a time."