View Full Version : Page redirect
cyberwarrior
08-23-2005, 04:06 PM
Hello all i am new in this site; i think need help :confused:
as it seen, redirect operations can be made with many ways. but i dont know how I can make redirection using the onload function of the body tag. can you write here for redirection with body onload
Thanks for your help... :)
onload redirections aren't necessary. Use:
<meta http-equiv="refresh" content="5;newpage.htm"/>
in your <head> to redirect the user to newpage.htm in five seconds.
jscheuer1
08-23-2005, 04:27 PM
This will not work for non javascript enabled browsers:
<body onload="window.location.replace('some.htm')">which could be a good thing, depending upon what your objectives are.
Also, if the page this is on takes a long time to load, it will not go to the new page for awhile. If you want close to instant redirection use:
<script type="text/javascript">
window.location.replace('some.htm')
</script>in the head, right after the opening <head> tag. Once again, only javascript enabled browsers will 'get it'.
cyberwarrior
08-23-2005, 07:58 PM
i cant manage it. these are useless.
for example=>> if the site which will be redirect is this : http://www.site.com/hacked.asp
What should i write ?? but for redirection with body onload...
thanks...
jscheuer1
08-23-2005, 08:26 PM
Twey,
What do you think, should we tell him? Or, have we said too much already? :eek:
Oh, I think he should be able to figure out the answer from the above posts. If he puts his mind to it.
"Useless," indeed.
cyberwarrior
08-24-2005, 01:56 PM
ohh..sorry, excuse me..I think there is a missunderstanding here.To tell you the truth, this is a level(page redirect) in a site. in order to pass the level at issue, I have to know redirect codes but i tried the aforementioned codes and much to my regret they werent usefull. It should be the another answer of this question. I have written all of them and i couldnt succeed.
I need your help guys!!!
Which browser are you using?
If it's a modern, up-to-date browser, and you haven't disabled either feature, both the Javascript redirect and the meta-refresh should have worked. Check you have entered them properly, and post a link to the page so we can have a look at it.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.