i want to redirect my page through script.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • iliyash
    New Member
    • Sep 2006
    • 1

    i want to redirect my page through script.

    [HTML]<head>
    <script language="text/javascript">



    var strlogin;
    strlogin=<xsl:v alue-of select="//./forum/dot_/sitename"/>;
    alert(strlogin) ;

    location.href=' http://test2.zapak.com/'+"strlogin";

    </script>
    </head>
    [/HTML]


    i get the value in strlogin ;
    in alert i am unable to display
    and i want that on load of body
    the page redirect to

    'http://test2.zapak.com/'+"strlogin
    Last edited by iliyash; Sep 7 '06, 01:18 PM. Reason: syntax error
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    If you get strlogin, to pass this to location.href on body load:[code=javascript]
    function redirect() {
    location.href=' http://test2.zapak.com/'+strlogin;
    }
    window.onload=r edirect;[/code]

    Comment

    Working...