Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > How do I call javascript functions from a menu when the user clicks on an option?

Reply
Thread Tools

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

 
 
Christine
Guest
Posts: n/a
 
      09-09-2004
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
 
Reply With Quote
 
 
 
 
Charlie
Guest
Posts: n/a
 
      09-10-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) (Christine) wrote in message news:<(E-Mail Removed) 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
 
Reply With Quote
 
 
 
 
Christine
Guest
Posts: n/a
 
      09-12-2004
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
 
Reply With Quote
 
nzgrover
Guest
Posts: n/a
 
      09-14-2004
(E-Mail Removed) (Christine) wrote in message news:<(E-Mail Removed) 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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Need Javascript - if user clicks in textbox, label not visible =?Utf-8?B?U2FuZHk=?= ASP .Net 7 07-10-2005 03:17 AM
Prevent menu or hyperlink clicks during postback =?Utf-8?B?TWFyayBMYXVzZXI=?= ASP .Net 2 05-13-2005 03:10 PM
Clicks and double-clicks PontiMax ASP .Net Datagrid Control 2 07-14-2004 11:00 AM
please help me in distinguish redefining functions, overloading functions and overriding functions. Xiangliang Meng C++ 1 06-21-2004 03:11 AM



Advertisments