Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onclick not working in Netscape but not IE

Status
Not open for further replies.

humbleprogrammer

Programmer
Oct 30, 2002
315
US
Hello,

I have an onclick event in a hyperlink that works in Netscape but doesn't work in IE. Below is my hyperlink.

Code:
<a href="javascript:void(0);" onclick="link1();">1</a>

Below is the link1 function and asp code

Code:
function link1()  
{
 document.orderform.goPage.value='order1.asp';
 document.orderform.submit();	
}

<%
If request.form("frmcomplete") = "yes" Then
	Session("BM0001") = request.form("BM0001")
	Session("BM0002") = request.form("BM0002")
	Session("BM0003") = request.form("BM0003")
	Session("BM0004") = request.form("BM0004")
	Session("BM0005") = request.form("BM0005")
	Dim goPage
	goPage = Request.Form("goPage")
	response.redirect goPage
End If
%>

Netscape handles this perfectly but it only works in IE if I put a # in the hyperlink like
Code:
<a href="#" onclick="link1();">1</a>
but a # in the hyperlink submits the page to itself before it does the processing, which I don't want.

Any help is greatly appreciated.

Thanks!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top