javascript popup alert on link click
You can use the onclick
attribute, just return false
if you don't want continue;
<script type="text/javascript">function confirm_alert(node) { return confirm("Please click on OK to continue.");}</script><a href="http://www.google.com" onclick="return confirm_alert(this);">Click Me</a>
Single line works just fine:
<a href="http://example.com/" onclick="return confirm('Please click on OK to continue.');">click me</a>
Adding another line with a different link on the same page works fine too:
<a href="http://stackoverflow.com/" onclick="return confirm('Click on another OK to continue.');">another link</a>
just make it function,
<script type="text/javascript">function AlertIt() {var answer = confirm ("Please click on OK to continue.")if (answer)window.location="http://www.continue.com";}</script><a href="javascript:AlertIt();">click me</a>