calling javascript in link

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Locked
bpeh
Beginner
Beginner
Posts: 2
Joined: Mon Sep 15, 2003 10:59 am

calling javascript in link

Post by bpeh »

hi, i am using the frames menu version 3.5.

issit possible for me to call a javascript in the url instead of just typing in the link?

eg. "javascript-code" target=main;sourceframe=main;
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

yeah
javascript:doSomething(var1)

or in another frame (IE):
javascript:parent.frames["frameName"].doSomething(var1)

or in another window (IE):
javascript:winName.frames["frameName"].doSomething(var1)
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
bpeh
Beginner
Beginner
Posts: 2
Joined: Mon Sep 15, 2003 10:59 am

Post by bpeh »

thanks, I followed the syntax u pointed but still got an error...
---------------
addmenu(menu=["MyMenu", , ,100,1,"",plain_style,,"left",effect,,,,,,,,,,,,
,"Basic English","javascript:alert('hi');",,,1
])

any ideas?
Locked