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

Button to hyperlink

Status
Not open for further replies.

gns100

Programmer
Aug 11, 2003
40
US
I have created a slideshow page and want to allow the visitor to use an "exit" button in a form to go back to another page on my website.

I wasn't able to use a hyperlink directly from the button which seemed the obvious way to go, but thought I could do something like the following.

Sorry for posting such a trivial item, but any help would be appreciated.

Code:
<html>
<head>
<title></title>

<SCRIPT type="text/javascript">
function testlink(){
"[URL unfurl="true"]http://www.yahoo.com"[/URL]
}

</SCRIPT>
</head>
<body>

<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="273">
  <tr>
    <td width="50%" height="253">&nbsp<INPUT TYPE="button" VALUE="Exit" onClick="testlink()">td>
  </tr>
</table>

</body>
</html>
 
Code:
function testlink() {
location.href="[URL unfurl="true"]http://www.yahoo.com"[/URL]
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top