Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirect page javascript question

Status
Not open for further replies.

zavsays

Technical User
Apr 19, 2001
117
US
Hi ... I know virtually nothing about javascript. I cut and pasted code from a web tutorial. The page waits 5 seconds .... then automatically redirects to the new page. That works just fine.

My problem is, the "code" is showing at the top of the webpage. I must have it (the code) in the wrong place.

Thanks for any help.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Redirect to The Family Wealth Alliance</title>
<meta http-equiv="Refresh" content="5;URL=http://www.fwalliance.com" />
<meta name="Description" content="The Family wealth Alliance offers an invaluable service to families of extraordinary means. We make sense of the bewildering world of wealth management firms through education." />
<meta name="Keywords" content="Family Wealth Alliance, finances, family education, firms, wealth assessment, financial planning, retirement,Strategic Philanthropy, Leadership in Transition, Stewardship of Wealth for Young Adults, Privacy &amp; Personal Security, Children &amp; Money" />

<style type="text/css">
<!--
body {
background-image: url(backcontact.gif);
background-repeat: no-repeat;
margin-left: 1px;
margin-top: 1px;
margin-right: 1px;
margin-bottom: 1px;
background-position: center top;
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
color: #999999;
}
.style8 {font-size: 12px}
a:link {
color: #999999;
}
a:visited {
color: #999999;
}
a:hover {
color: #999999;
}
a:active {
color: #999999;
}


-->
</style>
<script type="text/javascript">
<!--



function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}
//-->
</script>
function redirect() {
var uri = new Object();
getURL(uri);
location.href = 'http:\/\/ + uri.file;
}
setTimeout('redirect()',5000);


</head>

<body>
<div align="center"><p class="style8"><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Family Office Management has been moved to The Family Wealth Alliance </p>
<p class="style8">&nbsp;</p>
<p><span class="style8"><br />
<br />
You will be redirected in five seconds ... if not, <a href=" here</a> </span></p>
<p><br />
<br />
</p>
</div>
</body>
</html>
 
You have a meta refresh tag that redirects, and your Javascript that you have to redirect is outside script tags, which means it doesn't execute. Just delete the Javascript you were trying to use and everything should work fine.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top