|
-
Oct 9th, 2000, 03:15 PM
#1
Thread Starter
Frenzied Member
Is it possible to make it so when a page loads on the net it redirects to another page in java script, if so how ?
If this cannot be done then how do i open a new window at a certain address ?
-
Oct 10th, 2000, 06:21 AM
#2
Fanatic Member
hi PsyVision
you need to use the window.location function
<HTML>
<script language="javascript">
function redirectbrowser()
{
window.location = "somepage or url"
}
</SCRIPT>
<BODY onload="redirectbrowser();">
</BODY>
</HTML>
Hope this helps
Ian
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Oct 10th, 2000, 08:50 AM
#3
Fanatic Member
You don't need javascript for that, you can use this:
Code:
<HTML>
<HEAD><TITLE>Redirecting</title>
<meta http-equiv="Refresh" content="1; URL=http://www.altavista.com">
</HEAD>
</HTML>
-
Oct 10th, 2000, 02:16 PM
#4
Thread Starter
Frenzied Member
Thanks.....
But...
A short while after writing this post i scripted my own at last. I tried the second way but it never opened the new page i wanted, just refreahed the browser. What i did is bascially the same as 'Ianpbaker' did it.
Thanks Again.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|