OnClick event question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • J. Muenchbourg

    #1

    OnClick event question

    I'm trying to have users play a sound file and view a popup page when
    they click a link. Below is the script in the header, followed by the
    example of the link after the body tag:

    <script language="JavaS cript">
    <!------hide
    function newwindow0()
    {
    window.open(pop uppage.asp','ja v','width=517,h eight=673,resiz able=yes');
    }//------->

    </script>
    [[[[
    <a href="sound/mympeg.mp3" onClick="newwin dow0();return
    false">Sounds</a>

    This does not do both events when clicked.

    ???
    Muench

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
  • Lee

    #2
    Re: OnClick event question

    J. Muenchbourg said:[color=blue]
    >
    >I'm trying to have users play a sound file and view a popup page when
    >they click a link. Below is the script in the header, followed by the
    >example of the link after the body tag:
    >
    ><script language="JavaS cript">
    ><!------hide
    > function newwindow0()
    > {
    > window.open(pop uppage.asp','ja v','width=517,h eight=673,resiz able=yes');
    > }//------->
    >
    ></script>
    >[[[[
    ><a href="sound/mympeg.mp3" onClick="newwin dow0();return
    >false">Sound s</a>
    >
    >This does not do both events when clicked.[/color]

    By returning false from your onClick event handler, you're telling
    the browser to ignore the contents of your href attribute.

    Comment

    Working...