florida
05-10-2004, 08:35 PM
I want to have a link where you click on it and it will give you information about it and then you can choose to either continue (go to the web page) or cancel and stay in the same page.
Please advise how I can do this. Here is my attempt but not working:
function myfunc()
{
var yes = confirm("My page info. Would you like to view this page?\n");
if(yes)
{
return true;
}
else
{
location.href="stayoncurrentpage.cfm";
return false;
}
}
</script>
<a href="mylink.cfm" onclick="myfunc();"><strong>mylink</strong></a>
Please advise how I can do this. Here is my attempt but not working:
function myfunc()
{
var yes = confirm("My page info. Would you like to view this page?\n");
if(yes)
{
return true;
}
else
{
location.href="stayoncurrentpage.cfm";
return false;
}
}
</script>
<a href="mylink.cfm" onclick="myfunc();"><strong>mylink</strong></a>