Click to See Complete Forum and Search --> : how to autoamtically run a hyperlnk..
kevinrea
12-07-2002, 10:05 PM
hi guys..
i have a hyperlink that i would like to run when the page is opened in the user's browser.
would someone know how i could do this ?
this is my first try at any java script.. so some real elementary stuff would be appreciated.
thanks,
kevin rea
krea@socal.rr.com
Zach Elfers
12-07-2002, 10:10 PM
<script language="JavaScript" type="text/JavaScript">
function hyperlink() {
self.location.href = "page.html";
}
</script>
<body onLoad="hyperlink()">
That should do what you want.:)
kevinrea
12-07-2002, 10:17 PM
Hi Zach,
thank you very much..
is there a way to now close this same html page when
it gets done doing what it does ?
what it is , is this.
people click on my first page hyperlink to download the file, then it takes them to the page and i put your code in.. the file downloads...is there anyway to close it when it is done ? and just have the original page where they came from ?
I have the initial hyperlink for the file they are downloading opening a completely new window.
thanks,
kevin rea
Stefan
12-08-2002, 05:28 AM
Originally posted by Zach Elfers
<script language="JavaScript" type="text/JavaScript">
function hyperlink() {
self.location.href = "page.html";
}
</script>
<body onLoad="hyperlink()">
That should do what you want.:)
Remember to add this to your page also
<noscript>
<a href="page.html">Link to click for those that don't have javascript</a>
</noscript>