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
https://forums.phpfreaks.com/topic/205109-pop-up-message-happens-twice/
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>

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.