By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,712 Members | 2,063 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,712 IT Pros & Developers. It's quick & easy.

i want to redirect my page through script.

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



var strlogin;
strlogin=<xsl:value-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
Sep 7 '06 #1
Share this Question
Share on Google+
1 Reply


acoder
Expert Mod 15k+
P: 16,027
If you get strlogin, to pass this to location.href on body load:
Expand|Select|Wrap|Line Numbers
  1.  
  2. function redirect() {
  3.     location.href='http://test2.zapak.com/'+strlogin;
  4. }
  5. window.onload=redirect;
May 6 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.