Click here to Skip to main content
12,634,651 members (23,893 online)
Rate this:
 
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 20-Jul-12 8:06am
   
what happens if you run the code in chrome? javascript-error? nothing?
Venkat_C6 20-Jul-12 8:08am
   
nothng
Venkat_C6 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 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161208.2 | Last Updated 20 May 2014
Copyright © CodeProject, 1999-2016
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