Help - Search - Members - Calendar
Full Version: index.html
CyberiaPC.com Community > Technical Zone > Web Development
wizard james
heres what i want to do..

i want it so when people go to my homepage, they are redirected to another page.

i know i make a file called index.html but what do i put in it?

and were do i put it?
binary
CODE
<HEAD>
<script language="JavaScript">
<!--
window.location="http://domain.com";
//-->
</SCRIPT>
</HEAD>




in the <head> tags of ur first index page.
FiShMaStEr
QUOTE(madmo @ Aug 17 2004, 08:19 AM)
CODE
<HEAD>
<script language="JavaScript">
<!--
window.location="http://domain.com";
//-->
</SCRIPT>
</HEAD>




in the <head> tags of ur first index page.

yeh u can chuck whatever you want into th body but it wont do much, unless your on a slow connection and waiting for the page to send you to the other one.
binary
infact the only thing that u MAY want in the first index page's body is a message like,... "redircting you to bla bla" or whatever otherwise leave it blank.



EDIT: i think u can also set a time before the user is redircted if i remember correctly..

CODE
 function getgoing()
 {
   top.location="http://domain.com";
   alert("redirecting u in 5 seconds!");
    setTimeout('getgoing()',5000);
    }



but can any one confirm this?
wizard james
ok.. so how would i do this??

CODE
<HEAD>
<script language="JavaScript">
<!--
window.location="http://james.elbbit.com/Fire/upload/";
//-->
</SCRIPT>
</HEAD>


i dont know anyhting about this kind of code?.. html.. gona need a buy a book soon..any sites?>
binary
your page will look like this u dont need "meta " tags as i dont think the redirecting page will be even picked up

CODE
<html>
<head>
<script language="JavaScript">
<!--
window.location="http://james.elbbit.com/Fire/upload/";
//-->
</script>
</head>
<body>
</body>
</html>




EDIT: dont learn html from books its a waste of money and too easy u can pick it up from online try google and type Html turtorial very simple.i would aslo recommend using an editor which shows u the code , this is a very quick learning method , email me for dreamweaver mx 2004.
Burebista
In order to work on every browser it's better to avoid window.location= and use window.location.href= instead!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.