return false to cancel following the href link:
<a href="dontgo.jsp" onclick="func(); return false;">abc</a>
-----Original Message-----
From: Ishfaq Ahmed Lone [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 03, 2000 5:24 PM
To: [EMAIL PROTECTED]
Subject: anchor tag link problem
Hi all
In jsp i am using anchor tag for creating a link on the text
The script is like this
<html>
<head>
<script>
function func()
{
....
...
document.location.href="xxj.jsp"
}
</script>
</head>
<body>
<a href="dontgo.jsp" onclick=func()>abc</a>
</body>
</html>
when i am clicking on the text it doesnt go to the xxj.jsp(inside function)
instead it always goes to the href=dontgo.jsp.
Though it does execute the statments inside the function, however the link
there doesnt work.
Can anybody please tell me the solution to this problem.
Thanks in advance
ishfaq
*******************************************************
Ishfaq Ahmad Lone
*******************************************************
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets