0

I've been searching for other topics on Stackoverflow but cannot find what I search for.

What I want to do is to make a link to a page where a selection list is an define in the url which option should be selected.

E.g. the page 'selectionlist.html' has a selection list, '#select' with 2 options: 'value1' & 'value2'. If I make a link like this 'selectionlist.html?#select=value2', I want to go to that page with 'value2' already selected.

I'm pretty basic when it comes to javascript & jQuery, so I would appreciate to keep my noobines in mind ;)

Apoch8000
  • 1
  • 3
  • What you've described is a "querystring parameter." There are many examples of how to get them in JavaScript. When the page loads, you get the key/value from the query string and then find the select list and set the value. – Cᴏʀʏ Mar 01 '15 at 16:42
  • 1
    Here is something to help you : http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript – Telokis Mar 01 '15 at 16:44
  • I'll have a look into that! I just didn't know exactly what I was searching for ;) – Apoch8000 Mar 01 '15 at 16:57

0 Answers0