Linked Questions

1068 votes
6 answers
1.7m views

How do you redirect to a page from another page with JavaScript?
Lucky13's user avatar
  • 11.5k
1235 votes
3 answers
1.6m views

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?
jjujuma's user avatar
  • 22.9k
244 votes
4 answers
672k views

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 ...
user1990525's user avatar
  • 3,465
105 votes
6 answers
527k views

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.
Benjamin's user avatar
  • 2,163
68 votes
4 answers
115k views

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?
ash9209's user avatar
  • 1,018
59 votes
4 answers
81k views

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:...
user3522457's user avatar
  • 3,003
47 votes
5 answers
107k views

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,...
neko's user avatar
  • 497
37 votes
4 answers
29k views

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 ...
tshauck's user avatar
  • 21.7k
22 votes
3 answers
47k views

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?
Deepu Sasidharan's user avatar
29 votes
1 answer
81k views

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 ...
Hypn0tizeR's user avatar
37 votes
0 answers
184k views

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() { ...
Arron's user avatar
  • 442
8 votes
3 answers
12k views

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. ...
user2132849's user avatar
3 votes
3 answers
11k views

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 ...
Johan Dahl's user avatar
  • 1,738
13 votes
1 answer
3k views

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....
v2p's user avatar
  • 659
1 vote
2 answers
5k views

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.
Dove Man's user avatar
  • 147

15 30 50 per page
1
2 3 4 5
39