Help with onclick event on Macintosh

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

    #1

    Help with onclick event on Macintosh

    Hi folks

    Can somebody help with a problem I am having with onclick events.

    If I set up a link link this:

    <a href="#" onclick="if(con firm('Do you wish to
    proceed?')){loc ation.href='con tinue.html';}"> continue</a>

    The onclick works fine on my windows machine, but if the link is clicked on
    a macintosh nothing happens after the message box that appears is clicked..
    The message box closes and the script goes no further.

    Does anyone know how to make this work on both machines? I don't want to
    have to switch to using forms and buttons.

    Thanks

    Hamilton


  • Martin Honnen

    #2
    Re: Help with onclick event on Macintosh



    Spidah wrote:[color=blue]
    > Can somebody help with a problem I am having with onclick events.
    >
    > If I set up a link link this:
    >
    > <a href="#" onclick="if(con firm('Do you wish to
    > proceed?')){loc ation.href='con tinue.html';}"> continue</a>
    >
    > The onclick works fine on my windows machine, but if the link is clicked on
    > a macintosh nothing happens after the message box that appears is clicked..
    > The message box closes and the script goes no further.
    >
    > Does anyone know how to make this work on both machines? I don't want to
    > have to switch to using forms and buttons.[/color]

    Try
    <a href="continue. html"
    onclick="return confirm('Do you wish to continue?');">
    though I have no Mac here now to test

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/

    Comment

    Working...