Questions tagged [url-parameters]

URL Parameters are parameters whose values are set dynamically in a page’s URL, and can be accessed by its template and its data sources. This makes pages incredibly dynamic, enabling a single page to power an endless number of views.

The URL points to a web page. The URL may contain a static path, such as:

http://www.myStore/womens/Clothing.jsp

As is the case with any URL, you can append dynamic parameters that are used by the page located by the URL to the URL itself. At runtime, those dynamic parameters are replaced by property values, then passed to the page. For example:

http://www.myStore/womens/Clothing.jsp?type=$itemType&name=$displayName

The type parameter is replaced with the item’s item type and the name parameter is replaced by the item’s display name.

1203 questions
1714
votes
63 answers

Get the values from the "GET" parameters (JavaScript)

I have a URL with some GET parameters as follows: www.test.com/t.html?a=1&b=3&c=m2-m3-m4-m5 I need to get the whole value of c. I tried to read the URL, but I got only m2. How do I do this using JavaScript?
joe
  • 34,529
  • 29
  • 100
  • 137
606
votes
8 answers

How can I get the named parameters from a URL using Flask?

When the user accesses this URL running on my flask app, I want the web service to be able to handle the parameters specified after the question mark: http://10.1.1.1:5000/login?username=alex&password=pw1 #I just want to be able to manipulate the…
Alex Stone
  • 46,408
  • 55
  • 231
  • 407
535
votes
13 answers

How can I get query parameters from a URL in Vue.js?

How can I fetch query parameters in Vue.js? E.g. http://somesite.com?test=yay Can’t find a way to fetch or do I need to use pure JS or some library for this?
Rob
  • 10,851
  • 21
  • 69
  • 109
443
votes
34 answers

How to convert URL parameters to a JavaScript object?

I have a string like this: abc=foo&def=%5Basf%5D&xyz=5 How can I convert it into a JavaScript object like this? { abc: 'foo', def: '[asf]', xyz: 5 }
Alex
  • 66,732
  • 177
  • 439
  • 641
429
votes
4 answers

How to get a URL parameter in Express?

I am facing an issue on getting the value of tagid from my URL: localhost:8888/p?tagid=1234. Help me out to correct my controller code. I am not able to get the tagid value. My code is as follows: app.js: var express = require('express'), http =…
user2834795
  • 4,333
  • 2
  • 15
  • 10
304
votes
19 answers

Get escaped URL parameter

I'm looking for a jQuery plugin that can get URL parameters, and support this search string without outputting the JavaScript error: "malformed URI sequence". If there isn't a jQuery plugin that supports this, I need to know how to modify it to…
Sindre Sorhus
  • 62,972
  • 39
  • 168
  • 232
240
votes
32 answers

Change URL parameters and specify defaults using JavaScript

I have this URL: site.fwx?position=1&archiveid=5000&columns=5&rows=20&sorting=ModifiedTimeAsc what I need is to be able to change the 'rows' url param value to something i specify, lets say 10. And if the 'rows' doesn't exist, I need to add it to…
Sindre Sorhus
  • 62,972
  • 39
  • 168
  • 232
166
votes
4 answers

How to add link parameter to asp tag helpers in ASP.NET Core MVC

I have a lot of experience with ASP.NET MVC 1-5. Now I learn ASP.NET Core MVC and have to pass a parameter to link in page. For example I have the following Action [HttpGet] public ActionResult GetProduct(string id) { ViewBag.CaseId = id; …
Elvin Mammadov
  • 25,329
  • 11
  • 40
  • 82
165
votes
5 answers

Python Dictionary to URL Parameters

I am trying to convert a Python dictionary to a string for use as URL parameters. I am sure that there is a better, more Pythonic way of doing this. What is it? x = "" for key, val in {'a':'A', 'b':'B'}.items(): x += "%s=%s&" %(key,val) x =…
kzh
  • 19,810
  • 13
  • 73
  • 97
154
votes
10 answers

How to extract URL parameters from a URL with Ruby or Rails?

I have some URLs, like http://www.example.com/something?param1=value1¶m2=value2¶m3=value3 and I would like to extract the parameters from these URLs and get them in a Hash. Obviously, I could use regular expressions, but I was just…
Flackou
  • 3,631
  • 4
  • 27
  • 24
150
votes
5 answers

What is the difference between URL parameters and query strings?

I don't see much of a difference between the parameters and the query strings, in the URL. So what is the difference and when should one be used over the other?
koninos
  • 4,969
  • 5
  • 28
  • 47
115
votes
13 answers

How do you add query parameters to a Dart http request?

How do you correctly add query parameters to a Dart http get request? I been unable to get my request to respond correctly when trying to append the '?param1=one¶m2=two' to my url, yet it works correctly in Postman. Here's the gist of my…
Peter Birdsall
  • 3,159
  • 5
  • 31
  • 48
90
votes
20 answers

How to replace url parameter with javascript/jquery?

I've been looking for an efficient way to do this but haven't been able to find it, basically what I need is that given this url for…
Javier Villanueva
  • 3,886
  • 13
  • 48
  • 80
82
votes
6 answers

PHP check if url parameter exists

I have a URL which i pass parameters into example/success.php?id=link1 I use php to grab it $slide = ($_GET["id"]); then an if statement to display content based on parameter //content } ?> Just need to know…
user2389087
  • 1,692
  • 3
  • 17
  • 39
79
votes
7 answers

RestTemplate: How to send URL and query parameters together

I am trying to pass path param and query params in a URL but I am getting a weird error. Below is the code. String url = "http://test.com/Services/rest/{id}/Identifier" Map params = new HashMap(); …
Shiva
  • 913
  • 2
  • 8
  • 7
1
2 3
80 81