Redirection question

C

Code Monkee

Is there an HTML tag to automatically redirect the browser from the current
page to another? The technique I'm using is to submit a form with
javascript, but I'm guessing there must be an easier way.

Thanks.
 
B

brucie

Is there an HTML tag to automatically redirect the browser from the current
page to another?

well sort of...
The technique I'm using is to submit a form with javascript,

now we get the the real problem, not what you thought was a solution for
your perceived problem. don't use JS for from submission, it introduces
problems that need not exist, you seem to have discovered one of them
for yourself.
 
C

chris

Place this in the head:
<META HTTP-EQUIV="REFRESH" CONTENT="(waitingtime);URL=(newlocation)">
 
L

Louis Somers

Is there an HTML tag to automatically redirect the browser from the
current page to another? The technique I'm using is to submit a form
with javascript, but I'm guessing there must be an easier way.

Thanks.

Not HTML, but try this:

<html><head>
<script language="javascript" type="text/javascript">
window.top.location.href="http://whatever.com";
</script>
</head><body>
<p>Please <a href="http://whatever.com">click here</a> to continue</p>
</body></html>

A click is required if javascript is disabled.
 
J

Jukka K. Korpela

Code Monkee said:
Is there an HTML tag to automatically redirect the browser from the
current page to another?

No, even the <meta> hack works via the browser, which may refuse to
obey it, for good reasons.

Redirection is an HTTP thing and shouldn't be attempted in HTML.
The technique I'm using is to submit a
form with javascript, but I'm guessing there must be an easier way.

If that's the cure, I'd rather have the disease.

But we don't know what you real problem is. Please explain. If you wish
to let people access page B from page A, put a link to B onto A. If
your page has moved from one address to another, deal with it by making
the server do the redirect, without even looking at any HTML.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top