Tagged Questions
1555
votes
47answers
544k views
How can I get query string values?
Is there a plugin-less way of retrieving query string values via jQuery (or without)?
If so, how, and if not what plugin do you recommend?
78
votes
12answers
54k views
Parse query string in JavaScript [duplicate]
Possible Duplicate:
How can I get query string values?
I need to parse the query string www.mysite.com/default.aspx?dest=aboutus.aspx.
How do I get the dest variable in JavaScript?
62
votes
7answers
75k views
JavaScript query string
Is there any JavaScript library that makes a dictionary out of the query string, ASP.NET style?
Something that would be used like:
var query = window.location.querystring["query"]?
Is a "query ...
351
votes
5answers
93k views
Best practice: escape, or encodeURI / encodeURIComponent
When encoding a query string to be sent to a web server - what is the best practice to use from javascript:
Use escape:
escape("% +&=");
OR
use encodeURI() / encodeURIComponent()
...
51
votes
13answers
89k views
Adding a parameter to the URL with JavaScript
In a web application that makes use of AJAX calls, I need to submit a request but add a parameter to the end of the URL, for example:
Original URL:
http://server/myapp.php?id=10
Resulting URL:
...
38
votes
8answers
21k views
querystring encoding of a javascript object
Do you know a fast and simple way to encode a javascript object into a string that I can pass via GET?
No jQuery, no other frameworks, just plain Javascript :)
26
votes
3answers
18k views
Serialize JSON to query string in JavaScript/jQuery
I'm trying to find information on how to serialize a JSON object to query string format, but all my searches are drowning in results on how to go the other way (string/form/whatever to JSON).
I have
...
13
votes
6answers
74k views
jquery get querystring from URL [duplicate]
Possible Duplicate:
How can I get query string values?
I have the following URL:
http://www.mysite.co.uk/?location=mylocation1
What I need is to get the value of location from the URL ...
10
votes
4answers
18k views
How to get the query string by javascript?
How to extract the query string from the URL in javascript?
Thank you!
0
votes
2answers
2k views
how to exchange variables between two HTML pages?
I have two HTML pages, example1.html and example2.html.
How do I pass variables from example1.html to example2.html using the query string, and retrieve that variable in example2.html without using ...
11
votes
8answers
21k views
What is the easiest way to read/manipulate query string params using javascript?
The examples I've seen online seem much more complex than I expected (manually parsing &/?/= into pairs, using regular expressions, etc). We're using asp.net ajax (don't see anything in their ...
15
votes
6answers
30k views
How can I delete a query string parameter in JavaScript?
Is there better way to delete a parameter from a query string in a URL string in standard JavaScript other than by using a regular expression?
Here's what I've come up with so far which seems to ...
28
votes
8answers
22k views
add or update query string parameter
With javascript how can I add a query string parameter to the url if not present or if it present, update the current value? I am using jquery for my client side development.
3
votes
2answers
2k views
Get Querystring with Dojo
All,
Users will be hitting up against a URL that contains a querystring called "inquirytype". For a number of reasons, I need to read in this querystring with javascript (Dojo) and save its value to ...
1
vote
5answers
13k views
How to retrieve query string parameter and values using javascript (Jquery)?
<a class="clickme" href="test.php?id=100&status=pending&time=2009" id="p_100">Click me</a>
$('.clickme').click(function(event) {
event.preventDefault();
var stringId = ...