I have a Page with 4 links and each links looks like below.
<a href="contact.jsp?subject=one">Link1</a>
<a href="contact.jsp?subject=two">Link2</a>
<a href="contact.jsp?subject=three">Link3</a>
<a href="contact.jsp?subject=Four">Link4</a>
The contact.jsp is just a form which has a text box and a with 4 options. Whenever the user clicks on the links above it should take to the contact form with the actual subject option selected in line with the query parameter(subject) passed in the HREF link.
Is it possible to do in Jquery?
As long as you have the subject listed in the URL you can get it with something like this:
Then just make sure the value of the select box options corespond to the possibilities “one, two, three” and “four”.
In response to your comment below, if you’d like to then check the value and potentially show a file upload input, the code might look something like this: