Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Message Prompt
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

kolucoms6
Average Member

845 Posts

Posted - 19 May 2007 :  11:10:59  Show Profile

Before my visitor clicks on a link, I want to ask them whether they want to proceed or not.

If they click yes, then only go ahead.

How to accomplish it ?

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 19 May 2007 :  11:36:01  Show Profile  Visit HuwR's Homepage
hopefully you mean when they click on the link, rather than before you will need to use some javascript in the onclick event of the link
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 19 May 2007 :  12:19:06  Show Profile  Visit MarkJH's Homepage
Something like this might help...

<html><head><title>href confirm</title>
<script type="text/javascript">
function linkRef(yurl ){
var linkref = yurl;
if(confirm("do you really want to go here?")){
window.location.href=linkref;
}
}
</script>
</head>
<body>
<a href="#" onClick="linkRef('http://www.yahoo.com' )">Yahoo.com</a>
</body>
</html>

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

kolucoms6
Average Member

845 Posts

Posted - 19 May 2007 :  14:09:57  Show Profile
Thanks.

Worked perfectly.
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 21 May 2007 :  08:24:49  Show Profile
For the benefit of those without Javascript, change the anchor to:
<a href="http://domain.tld/" onclick="linkRef(this)">link</a>

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

kolucoms6
Average Member

845 Posts

Posted - 21 May 2007 :  10:02:00  Show Profile

Thanks Shaggy Once again.

You are simply great.


Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07