By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,624 Members | 1,737 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,624 IT Pros & Developers. It's quick & easy.

How do I call javascript functions from a menu when the user clicks on an option?

P: n/a
Hello,
I have a webpage, and I need to display a menu of 4 items...when one
of the items is selected, I want it to call a script that creates the
related pop-up window. I currently have the pop-ups working when the
user clicks on a link on the page, however I need to display it as a
menu instead...

I am using a combination of javascript, html, and lisp.

So currently there are links displayed to the webpage like
Tutorial 1
and when clicked, it calls a script from the lisp code via
(format stream <a href=~ajavascript:ShowTut1('http://blah.edu/tut1.html')~a\;>Tutorial
1</a> #\" #\")
The script to create the popups uses 'this.open'

The actual language isn't of much concern...I'm just not sure how to
call a javascript function from a menu selection using onChange or
something similar. Anyone have an example of how to do that?

Thanks,
Christine
Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
wi*********@yahoo.com (Christine) wrote in message news:<26*************************@posting.google.c om>...
Hello,
I have a webpage, and I need to display a menu of 4 items...when one
of the items is selected, I want it to call a script that creates the
related pop-up window. I currently have the pop-ups working when the
user clicks on a link on the page, however I need to display it as a
menu instead...

I am using a combination of javascript, html, and lisp.

So currently there are links displayed to the webpage like
Tutorial 1
and when clicked, it calls a script from the lisp code via
(format stream <a href=~ajavascript:ShowTut1('http://blah.edu/tut1.html')~a\;>Tutorial
1</a> #\" #\")
The script to create the popups uses 'this.open'

The actual language isn't of much concern...I'm just not sure how to
call a javascript function from a menu selection using onChange or
something similar. Anyone have an example of how to do that?

Thanks,
Christine


Christine,

Do you want to perform a function on the: onMouseOver event?

-Charlie
Jul 23 '05 #2

P: n/a
Hi,
I don't think that mouseover will do it...I want to have a dropdown
menu with approx 4 choices. When the user selects one of the choices,
it should trigger the corresponding script. I looked for an example
of this, but the only thing that seems to be anywhere online is using
links as the choices and opening that link in the window using
location.href....I need to call a script that creates a popup window
with static html and times out after a certain period of time. I've
got the other stuff (popup and timer) working, I just need to figure
out the dropdown menu/script part of it. Any ideas?

--Christine
Jul 23 '05 #3

P: n/a
wi*********@yahoo.com (Christine) wrote in message news:<26************************@posting.google.co m>...
Hi,
I don't think that mouseover will do it...I want to have a dropdown
menu with approx 4 choices.
--Christine


Try: http://www.brainjar.com/dhtml/menubar/demo.html
or look for menu stuff here: http://www.alistapart.com/
or here (read this site through): http://www.quirksmode.org/
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.