Click here to Skip to main content
13,357,514 members (73,246 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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.

Posted 20-Jul-12 3:04am
Updated 29-Jun-17 2:00am
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
Venkat_C6 20-Jul-12 8:34am
Hey I got it. I gave setTimeOut with half second delay then its working...
Rate this: bad
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);
Rate this: bad
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")
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 |
Web01 | 2.8.180111.1 | Last Updated 29 Jun 2017
Copyright © CodeProject, 1999-2018
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