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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do I link using javascript?

Status
Not open for further replies.

taval

Programmer
Jul 19, 2000
192
GB
I currently have the following javascript code:

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!-- Start Hiding the Script

var alreadyWarned = false;
function deleteFunction() {
value = confirm(&quot;Delete Current Customer Record with ID : <%=myval%>. Proceed? &quot;);
alreadyWarned = true;
if (value) {
<< place code here to jump to another link
<< place code here to jump to another link
<< place code here to jump to another link

[color]

}

}

// Stop Hiding script --->
</SCRIPT>

how do i produce code that will take me to another page, I want to link to an asp page such as &quot;customer.asp&quot; with a querystring atttached such as &quot;customer.asp?id=12&quot;, I was wondering how to do this in javascript. Because I only want to jump to another page if the user clicks ok.

Grateful for anyh help. Thanks.

 
if (value){
document.location.href=&quot;customer.asp?id=12&quot;;
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top