in Education by
I am using jquery ajax get. SO when my form is submitted it then submits to a php file but the url stays the same because i am using ajax. $('#search').submit(function() { $.get("http://example.co.uk/ajax/post.php", $(this).serialize(), function(response){ $('#content').html(response.content); },"json"); return false; }); Ok this work url will stay the same. www.example.com ok if i remove the return false so i get the default functionality of the form i get the following. www.example.com?name=test&location=wales ok here is what i am looking for i want to use ajax but still have the params appended to the title reason for this is i want my url to be shared with others so it will pull down the params from it. example www.example.com // will just so the basic page but www.example.com?name=test&location=wales // will show the page specific to wales Any help please??? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
You’d probably need to use the hash (.com/#) in order for this to happen as you can’t just edit the URL. Ben Alman’s jQuery hashchange event plugin is probably a good start. It allow you to detect when it changes. This tutorial may also help: Enabling the Back Button by jQuery for Designers.

Related questions

0 votes
    I am using jquery ajax get. SO when my form is submitted it then submits to a php file but the ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 7, 2022 in Education by JackTerrance
0 votes
    When I use ajax call from a modal window, the request url seems not correct. I have a webserver ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I wanted to find a way to extract from the url the classes to be added to the body. I made some ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I wanted to find a way to extract from the url the classes to be added to the body. I made some ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    We are planning to use the jQuery library to augment our client side JavaScript needs. Are there any major ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 25, 2022 in Education by JackTerrance
0 votes
    I am building a backoffice to a certain site, and here i need to delete the comments from the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 9, 2022 in Education by JackTerrance
0 votes
    I am building a backoffice to a certain site, and here i need to delete the comments from the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 7, 2022 in Education by JackTerrance
0 votes
    I am building a backoffice to a certain site, and here i need to delete the comments from the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 5, 2022 in Education by JackTerrance
0 votes
    I am building a backoffice to a certain site, and here i need to delete the comments from the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 5, 2022 in Education by JackTerrance
0 votes
    My question is a variant of the question here However, there are two differences: I don't know how ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 23, 2022 in Education by JackTerrance
0 votes
    My question is a variant of the question here However, there are two differences: I don't know how ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 23, 2022 in Education by JackTerrance
0 votes
    I need to work with an ajax powered web page so I can pass an id or ids in the URL and it ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    I have a POST request that passes data to my database when the form is submitted. Photo of what I ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 14, 2022 in Education by JackTerrance
0 votes
    I have a POST request that passes data to my database when the form is submitted. Photo of what I ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 13, 2022 in Education by JackTerrance
0 votes
    I am using a framework, which returns invalid JSON String like: /* { "myobject" : "test"} */ ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
...