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
8
votes
1 answer

Is it legal or safe to depend on the ordering of URL query parameters?

Is it legal or safe to depend on the ordering of URL query parameters? Specifically, would I be able to write code, and trust that that code will always work, that had different behavior based on these two query strings: ?a=10&add=5&multiply=3 #…
Scott Stafford
  • 43,764
  • 28
  • 129
  • 177
8
votes
1 answer

How to use URL parameters using Meteorjs

How can I use URL parameters with meteor. The URL could look like this: http://my-meteor.example.com:3000?task_name=abcd1234 I want to use the 'task_name' (abcd1234) in the mongodb query in the meteor app. eg. Template.task_app.tasks = function ()…
kstieger
  • 133
  • 1
  • 5
7
votes
1 answer

How do you test the params hash in a Rails test?

The following generates an error: "undefined local variable or method `params'" assert_equal params[:recipient_id], users(:one).id How do you test the params hash? Also, how do you test assert_redirect when there are params present? The params are…
B Seven
  • 44,484
  • 66
  • 240
  • 385
7
votes
1 answer

Javascript - Use fetch on localhost with URL parameters

I have a NodeJS server running on port 3001 of my computer. I can use fetch to access a localhost endpoint, like this: fetch("/api_endpoint"). However, I also want to include url parameters in my GET request. Normally, I could include url parameters…
Foobar
  • 7,458
  • 16
  • 81
  • 161
7
votes
2 answers

Access url parameters of pwa address

I am new to ionic 2. After a searching everywhere I can not find a direct answer given the following scenario: I am building a PWA with ionic 2 (because I will later develop hybrid versions of this app) the address where users will find and…
7
votes
1 answer

Wordpress 404 error when adding /?name=someonesname at the end of my URL

I am trying to pass informations from aweber to my thank you page, but for some reasons, only the name parameter doesn't work, it makes a 404 error. Every other URL parameters works perfectly ( for exemple ?email=yourmail&birthday=02/05/1982 ) but…
Mkz
  • 71
  • 1
  • 3
7
votes
2 answers

Browser Back button changes dynamic url Parameters

I am working on a website, where url parameter gets updated based on user action, according to which I update the webpage without refreshing. Consider the scenario of E-commerce where url changes when user clicks on filters and then updated products…
Rahul Sagore
  • 1,588
  • 2
  • 26
  • 47
7
votes
3 answers

Stop URL parameters being added on submit of form

Okay, so this may be a stupid question, but I'm attempting to write a simple JavaScript app-thing (please excuse my terminology, I'm new to this) which includes a form, except I'm doing it using only HTML and JS (and CSS), so I'm accessing the…
7
votes
2 answers

Express Framework app.post and app.get

I am fairly new to the express framework. I couldn't find the documentation for application.post() method in the express API reference. Can someone provide a few examples of all the possible parameters I can put in the function? I've read a couple…
jensiepoo
  • 571
  • 3
  • 9
  • 26
7
votes
1 answer

Change URL from controller?

Is there a way to change the current url params from the controller so when the page is loaded, additional/different parameters are displayed in the address bar? Here's what I mean, say I have an action 'Products': public ActionResult Product(int…
Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632
7
votes
3 answers

MediaWiki URL parameters without values

The query part of a URL seems to consist of key-value pairs separated by & and associated by =. I've taken to always using jQuery's $.param() function to URL-encode my query strings because I find it makes my code more readable and maintainable. In…
hippietrail
  • 15,848
  • 18
  • 99
  • 158
7
votes
2 answers

how to send url parameter in POST request without form

I have to pass a parameter in url. I can't send it in as usual GET request the variable and value is shown in the address bar with the request. So, the end user can change the value for this variable value and send request which will be…
Nazneen
  • 789
  • 3
  • 12
  • 23
6
votes
1 answer

How to bind a URL parameter with an input field in Vanilla JS?

I have an example running here, where the input is set by ?amount=123 const query = new URL(location).searchParams const amount = parseFloat(query.get('amount')) console.log("amount", amount) document.getElementById('amount').value =…
hendry
  • 9,725
  • 18
  • 81
  • 139
6
votes
2 answers

How can I create a Wicket URL that hides its parameters?

I'm currently creating a set of links with code like this: BookmarkablePageLink havarti = new BookmarkablePageLink("havarti", CheeseMain.class); havarti.setParameter("Title", "Havarti"); havarti.setParameter("Group",…
Pops
  • 30,199
  • 37
  • 136
  • 151
6
votes
2 answers

Why is the URL parameter I want to retrieve not fully displayed?

I am tracking URLs with "posName" parameters like: example.com?posName=Content+&+Community+Manager+(H/F) But my code returns "Content" only: function () { var uri = document.location.href; var uri_dec = decodeURIComponent(uri); var url =…
B4b4j1
  • 430
  • 2
  • 7
  • 24