Redirection with javascript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Webstyler

    Redirection with javascript

    Hi, I must create a redirect :

    1@mysite.com must open www.mysite.com and The url must remain 1
    @mysite.com

    I have obtain redirect correctly with this code :

    <script language="Javas cript">
    <!--
    var indirizzo = window.location ;
    if (indirizzo == 'http://www.mysite.com/') {
    location.href = "http://www.mysite.com/index_norm.php" ;
    }
    if (indirizzo == 'http://gest@mysite.com/') {
    location.href= "http://www.mysite.com/gest/";
    }
    if (indirizzo == 'http://biella@mysite.c om/') {
    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="Javas cript">
    <!--
    var indirizzo = window.location ;
    if (indirizzo == 'http://www.mysite.com/') {
    var dest = "http://www.mysite.com/index_norm.php" ;
    }
    if (indirizzo == 'http://gest@mysite.com/') {
    var dest= "http://www.mysite.com/gest/";
    }
    if (indirizzo == 'http://biella@mysite.c om/') {
    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><nofra mes></noframes>
    </body>

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

    thks
  • Webstyler

    #2
    Re: Redirection with javascript

    hikksnotathome@ aol.com (HikksNotAtHome ) wrote in
    news:2003070918 1454.23307.0000 1289@mb-m29.aol.com:
    [color=blue]
    > In article <rpXOa.10594$qa 5.235245@news2. tin.it>, Webstyler
    > <none@none.it > writes:
    >[color=green]
    >>if (indirizzo == 'http://biella@mysite.c om/') {
    >>var dest= "http://www.mysite.com/biella/";
    >>}
    >>-->
    >></script>
    >></head>
    >>
    >>
    >><FRAMESET ROWS="*,0" FRAMEBORDER=0 BORDER=0 FRAMESPACING=0>
    >><FRAME SRC="WRITE VAR VALUE HERE" NORESIZE>
    >></FRAMESET><nofra mes></noframes>
    >>
    >>
    >>BUT, HOW can I write the var value in the body ?[/color]
    >
    > Instead of :
    > <FRAME SRC="WRITE VAR VALUE HERE" NORESIZE>
    >
    > <script type="text/javascript">
    > document.write( '<frame src=" ' + dest + ' " noresize>');
    > </script>[/color]

    sorry, but don't work

    Comment

    Working...