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

Discussion in 'Javascript' started by Christine, Sep 9, 2004.

  1. Christine

    Christine Guest

    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, Sep 9, 2004
    #1
    1. Advertising

  2. Christine

    Charlie Guest

    (Christine) wrote in message news:<>...
    > 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
    Charlie, Sep 10, 2004
    #2
    1. Advertising

  3. Christine

    Christine Guest

    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
    Christine, Sep 12, 2004
    #3
  4. Christine

    nzgrover Guest

    nzgrover, Sep 14, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    1
    Views:
    401
    Michael Pearson
    Oct 30, 2003
  2. =?Utf-8?B?RGF2ZQ==?=

    Capture server event when a user clicks a <TD>?

    =?Utf-8?B?RGF2ZQ==?=, Feb 8, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    531
    Frank Buchan
    Feb 11, 2005
  3. =?Utf-8?B?TWFyayBMYXVzZXI=?=

    Prevent menu or hyperlink clicks during postback

    =?Utf-8?B?TWFyayBMYXVzZXI=?=, May 13, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    537
    =?Utf-8?B?TWFyayBMYXVzZXI=?=
    May 13, 2005
  4. =?Utf-8?B?U2FuZHk=?=
    Replies:
    7
    Views:
    7,396
    =?Utf-8?B?U2FuZHk=?=
    Jul 10, 2005
  5. PontiMax

    Clicks and double-clicks

    PontiMax, Jul 14, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    177
    Eliyahu Goldin
    Jul 14, 2004
Loading...

Share This Page