top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

How can I redirect the user from one page to another using jQuery?

+3 votes
115 views
How can I redirect the user from one page to another using jQuery?
posted Mar 16, 2015 by Merry

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+2 votes
 
Best answer

Redriect from one page to other:

var url = "http://Queryhome.com";
$(location).attr('href',url);

You can even pass URL directly to attr() method, instead of using a variable.

answer Mar 16, 2015 by Manikandan J
+1 vote

On top of what mani has suggested -

jQuery is not necessary, and window.location.replace(...) will best simulate an HTTP redirect.

For example:

// similar behavior as an HTTP redirect
window.location.replace("http://tech.QueryHome.com");
answer Mar 16, 2015 by Salil Agrawal
Similar Questions
+2 votes

Can someone help me with this (Better to provide code for top 3 providers Google, Microsoft and JquerySite).

+3 votes

I am trying to control input field using jQuery previously I had only numbers and could use $(this).autoNumeric(), now I have come around where it is required to change the input field in form of 'Numbers dash Numbers'.
i.e:- 1.343-45.643

Is there anything similar to autoNumeric which can do my work apart from writing my own regex and jquery method.

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...