4

The.location.href document does not work in the Chrome browser

 2 years ago
source link: https://www.codesd.com/item/the-location-href-document-does-not-work-in-the-chrome-browser.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

The.location.href document does not work in the Chrome browser

advertisements

The command:

document.location.href="www.google.com"

Does not change the current web page in the google chrome browser. The command does transfer the page in the IE9 browser.

Why would this command work for IE9 but not for chrome?


You need to add the protocol:

document.location.href="http://www.google.com";

Related Articles

Command & ldquo; Window.location.href & rdquo; Does not work on HTML (Bootstrap framework)

I'm currently working on a university project in which I need to create a simple login screen which redirects the user to another landing page. As I'm new to web programming, I searched some functions and found that the most used command is the windo

Jquery's drag and drop does not work properly in Chrome Browser when code is placed in the Joomla article

I have Placed a jquery drag and drop example in joomla article. It's working properly with firefox browser but not working in chrome browser. In chrome, actually drag and drop is working but problem is that buttons are not visible on dragging. Here's

Location of the href window does not work

I am trying to navigate to a new page using javascript. When I put window.location.href = "next.html" in the header of a page it works fine. but when calling it from a function after a button is clicked, it does not work. Example code: function

The HTML5 audio tag does not work in Android - Chrome when it is created in JS?

I'm using a .mp3 file, the .mp3 file plays okay when viewed directly and also when embeded using the HTML5 audio tag, however when creating the HTML5 audio tag in JS it does not play! (very strange) I do not have this issue in any other browser/devic

The jQuery cycle plugin (often) does not work in Google Chrome

For some reason, when I first go to a recent page I built, the jQuery Cycle plugin does not work. The site is located here (site is in a different language [Hebrew]). Regardless of the language it's in, the Cycle plugin works fine in Firefox and IE.

CodeIgniter: The session does not work in Google Chrome

The browser has succesfully got a cookie once (how? when? i really can't tell. I just can tell that at a certain time, I realized that my website wasn't working anymore in chrome). Now chrome keeps showing : "This site has no cookies" in the dev

The jQuery script does not work properly on Chrome

I have the following code that seems to not work in Google Chrome. $("#productImg img").click(function() { var img = $(this).attr("src"); var text = $(this).attr("id"); $("#loader").show(); $("#largeImg img&quo

The Crystal Report Viewer button does not work in Google Chrome and Firefox but in IE

Mine is asp.net with c# web application. Crystal Report Print button is not working in Google chrome and Firefox but fine in IE. When I click on print button of Crystal Report Viewer it just refresh the web page and doesn't display any dialog in Goog

Flash Player's Trusted File Does Not Work with Built-in Browser on Linux

I have an application which embeds a xulrunner based browser. I have to load some flash content in this browser. At certain points of time the flash changes my URL and Page Title to reflect the location in the flash file where I am at. This works fin

Border-Radius does not work in email and browser

I have been designing a newsletter, and whilst the border-radius work on my localhost (showing all the rounds edges) - but it does not work when tested through sample email. I emailed myself using yahoo mail and Firefox, it came out with sharp edges.

setInterval does not work properly with chrome

I've made an image fader using 2 <div>s (one is an image and the other is a ul containing several images) the script is working perfectly on firefox and Safari but not working properly on Chrome, it just does the first fade and then it stops the scr

Flexbox-based CSS does not work on any iOS browser

I am using Jade, Stylus and Node JS for my website. It runs fine on desktop Chrome, Firefox, IE, and Edge. It runs fine on Android Chrome and Browser. It does not function properly on iOS Chrome or Safari, showing similar failures on both. It also do

Asp.NET LinkButton does not work on Google Chrome

I have a page with several linkbuttons, and all of them is not working in Google Chrome. They are working well in IE and Firefox. Chrome Inspector can find the linkbutton and it has a javascript-postback attached for a postback call. The button is pl

jQuery resizes does not work with FireFox, Chrome and Safari

$("#dvMyDIV").bind("resize", function(){ alert("Resized"); }); or $("#dvMyDIV").resize(function(){ alert("Resized"); }); The questions Why is this not working at FireFox, Chrome and Safari? Can this be con

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK