Linked Questions
572 questions linked to/from How do I redirect to another webpage?
1068
votes
6
answers
1.7m
views
How do I redirect with JavaScript? [duplicate]
How do you redirect to a page from another page with JavaScript?
1235
votes
3
answers
1.6m
views
How to get the browser to navigate to URL in JavaScript [duplicate]
What is the best (correct, modern, cross-browser, safe) way to get a web browser to navigate to a URL of your choice using JavaScript?
244
votes
4
answers
672k
views
How to go to a URL using jQuery? [duplicate]
How to go to a URL using jQuery or JavaScript.
<a href="javascript:void(0)" onclick="javascript:goToURL()">Go To URL</a>
function goToURL(url){
// some code to go to url
}
I don't ...
105
votes
6
answers
527k
views
jQuery location href [duplicate]
I remember there's a redirect function in jQuery.
It was like:
$(location).href('http://address.com')
But what was it exactly? I couldn't remember and can't find it using Google Search.
68
votes
4
answers
115k
views
I want to load another HTML page after a specific amount of time [duplicate]
I have one html page "form1.html" which has an animated image. I want to load another page "form2.html" after 5 seconds. How do I do this?
59
votes
4
answers
81k
views
String is not a function on window location href [duplicate]
Consider:
$('.b').click(function(){
var link = 'www.yahoo.com';
window.location.href(link);
});
I expect it to open www.yahoo.com, but it says "string is not a function". Why?
jsFiddle: http:...
47
votes
5
answers
107k
views
How to make a page redirect using JavaScript? [duplicate]
I'm making a shopping mall website using a Yahoo solution. I have multiple options for items and some items have different price dependent on the options.
Yahoo doesn't support multiple price options,...
37
votes
4
answers
29k
views
Redirect Using jQuery [duplicate]
So I'm using jquerymobile for an app I'm creating. I have a link that if all the validation passes I'd like to go through, but if something fails I'd like to redirect.
In the jquery something like ...
22
votes
3
answers
47k
views
How do I use a header location in jQuery? [duplicate]
Can I use a header location in jQuery for redirection or refresh?
Like in PHP:
header('location:www.google.co.in');
header("Refresh:1,url=home.php");
If not, what is the alternative way?
29
votes
1
answer
81k
views
Redirect to other page on alert box confirm [duplicate]
This is a piece of my function with the question in it:
function deletePost() {
var ask = window.confirm("Are you sure you want to delete this post?");
if (ask) {
window.alert("This ...
37
votes
0
answers
184k
views
How can I use jQuery to redirect to another page? [duplicate]
I have a log-in form that I want to validate and redirect (if the username and password are correct) with jQuery, and the redirect isn't working.
This is my code:
$(document).ready(function() {
...
8
votes
3
answers
12k
views
URL Redirect Javascript [duplicate]
URL Redirect Javascript?
I have am trying to redirect an entered web address with a http:// and prompt until a http:// is found and if it is found it will direct it to the website that is entered.
...
3
votes
3
answers
11k
views
Passing variable to window.location href [duplicate]
I'm trying to delay outgoing links when clicked, so that googles event tracking have time to occur.
I wrote the following code, but I'm unsure of how to pass my variable to window.location. It just ...
13
votes
1
answer
3k
views
redirect to same page to anchor [duplicate]
Need make redirect from http://sitename.com/cat/index.php to http://sitename.com/cat/index.php#anchor
I tried 2 ways: php redirect and meta refresh
PHP redirect
<?php
$URL = "http://sitename....
1
vote
2
answers
5k
views
Redirect on Key Press? [duplicate]
So I have a website and I am looking for a way to redirect a user to another webpage when they press the Esc key.