Ask the Expert

Javascript example for redirecting users automatically

I am trying to modify the Index.html. I find that I have to either include a meta-tag for an auto refresh and redirect (it will pause, then redirect to the application), or the other way is to use a javascript to automatically redirect to the application. I'm unsure how to use meta-tag (syntax) or Javascript. Can you help me?

Here's my javascript example below for redirecting users automatically.



<TITLE>
redirect ebt-now WebServices
</TITLE>
<LINK href="/ebtnowb/theme/Master.css" rel="stylesheet" type="text/css">
<SCRIPT language="JavaScript">
<!--
// redirect to another window
var aURL =  "index.html"
function change_window(aURL) 
{
	window.location = aURL;
}
//-->
</SCRIPT>
</HEAD>

<BODY BGCOLOR="#FFFFFF">
<FORM>
<CENTER>
<TABLE width="700" style="font-size : x-small;font-family : Arial,sans-serif;">
  <COL span="1" width="100">
  <COL span="1">
  <COL span="1" width="100">
  <TBODY>
    <TR>
      <TD>ebt-now, delivers QuickWebApps integrating your programs & data for 
less...
	</TD>
<TD></TD>
    </TR>
  </TBODY>
</TABLE>
</CENTER>
</FORM>
<SCRIPT language="JavaScript">
<!--
change_window(aURL)
//-->
</SCRIPT>
<FORM>
<CENTER><INPUT type="submit" name="ebtnowLinkB" value="ebt-now 
Quickstart WebServices HOME" style="font-size : x-small;font-family : Arial,sans-
serif;left : auto;"> </CENTER>
</FORM>
</BODY>
</HTML> 



This was first published in June 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: