Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Javascript
Hi all,
 
window.location.href (or) document.location.href is not working in Chrome. Is there any alternation? Please help me its urgent. I had searched in google but I din't get exactly.
 
Thanks...
Posted 20-Jul-12 3:04am
Comments
AlluvialDeposit at 20-Jul-12 8:06am
   
what happens if you run the code in chrome? javascript-error? nothing?
Venkat_C6 at 20-Jul-12 8:08am
   
nothng
Venkat_C6 at 20-Jul-12 8:34am
   
Hey I got it. I gave setTimeOut with half second delay then its working...
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi frnds I got it. I used setTimeout then its working in all browsers.
 
setTimeout(function(){document.location.href = "page.html;"},500);
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

You can go with the following code instead of location.href.
 
window.location.assign("link to next page")
  Permalink  
Comments
Member 8765679 at 2-Jun-13 15:16pm
   
Solution 1 works for all browsers - use it

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Zoltán Zörgő 265
1 /\jmot 205
2 CHill60 145
3 Peter Leow 145
4 Sergey Alexandrovich Kryukov 115
0 Sergey Alexandrovich Kryukov 9,353
1 OriginalGriff 6,881
2 Peter Leow 4,577
3 Zoltán Zörgő 4,129
4 Richard MacCutchan 2,882


Advertise | Privacy | Mobile
Web02 | 2.8.150129.1 | Last Updated 20 May 2014
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100