Jump to content

Pop Up Message Happens Twice???


Wayniac

Recommended Posts

I problem I am having is when the pop up message appears saying "Example Text". I have to click it twice for it to go away. The first time I click it, that activates the button to go to the URL stated. The second click just makes it go away. How do I merge these together so when I click "Ok", it simply goes to the specified URL?

 

Thank you

 

<script type="text/javascript">
function message() {
  if (message != 2) {
  alert("Example Text")
  }
}
</script>                                                 

<a href="javascript:message();"><input type="image" name="submit" border="0" src="http://www.example.com/buynow.png" alt="PayPal - The safer, easier way to pay online"></a>

Link to comment
Share on other sites

Thank you for replying F1, I tried as you said by removing the IF statement and nothing has changed. The IF statement was completely pointless to have in there, but also me removing it had no effect. It still prompts the user twice...

Link to comment
Share on other sites

Hi.. Try this.. Alert(Pop up) will be coming only one time..

 

<script type="text/javascript">

function message() {

  if (message != 2) {

  alert("Example Text");

  }

}

</script>                                               

 

<a href="#" onClick="return message();"><input type="image" name="submit" border="0" src="http://www.example.com/buynow.png" alt="PayPal - The safer, easier way to pay online"></a>

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.