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

C

Christine

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
 
C

Charlie

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
 
C

Christine

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top