Redirection with javascript

W

Webstyler

Hi, I must create a redirect :

(e-mail address removed) must open www.mysite.com and The url must remain 1
@mysite.com

I have obtain redirect correctly with this code :

<script language="Javascript">
<!--
var indirizzo = window.location;
if (indirizzo == 'http://www.mysite.com/') {
location.href = "http://www.mysite.com/index_norm.php";
}
if (indirizzo == 'http://[email protected]/') {
location.href= "http://www.mysite.com/gest/";
}
if (indirizzo == 'http://[email protected]/') {
location.href= "http://www.mysite.com/biella/";
}

-->
</script>

NOW , this it's ok but the url change in the bar adress , so use this :

<script language="Javascript">
<!--
var indirizzo = window.location;
if (indirizzo == 'http://www.mysite.com/') {
var dest = "http://www.mysite.com/index_norm.php";
}
if (indirizzo == 'http://[email protected]/') {
var dest= "http://www.mysite.com/gest/";
}
if (indirizzo == 'http://[email protected]/') {
var dest= "http://www.mysite.com/biella/";
}
-->
</script>
</head>

<body>
<FRAMESET ROWS="*,0" FRAMEBORDER=0 BORDER=0 FRAMESPACING=0>
<FRAME SRC="WRITE VAR VALUE HERE" NORESIZE>
</FRAMESET><noframes></noframes>
</body>

BUT, HOW can I write the var value in the body ?

thks
 
W

Webstyler

(e-mail address removed) (HikksNotAtHome) wrote in
Instead of :
<FRAME SRC="WRITE VAR VALUE HERE" NORESIZE>

<script type="text/javascript">
document.write('<frame src=" ' + dest + ' " noresize>');
</script>

sorry, but don't work
 

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,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top