I’m trying to make these section go to specific pages but not sure where to go from here. Can someone help me please with sample url pages. Here is my code:
<div style="background-color:#cde4f1;padding:10px 5px 30px 5px;width:70%;">
<p><strong>Ut varius lorem mi, non tristique felis hendrerit id.</strong></p>
<select>
<option>--Choose--</option>
<option>3 parts Medications </option>
<option>4 parts Medications </option>
<option>Medication page</option>
</select>
<button type="button">Go</button>
</div>
Good solution by @liontas76
Using that you will not need a submit button. The user goes directly to the url specified in the value part on selecting that option.
If you need to pass some value along with the url use URL params at the end of your url.
JS shouldn’t be relied upon to navigate to pages so make sure that the form is backed up with a server side script to take care of that as documented here.
@PaulOB as per the requirement of the OP it looks like a simple requirement of conditional navigation. If it was a part of a form obviously one would need to wait till other fields are filled and the button is pressed.
I don’t think that has anything to do with what I was saying:)
I was simply saying JS shouldn’t be relied for navigation and if JS is disabled the site should still be navigable which for a select can be achieved by submitting the form and then re-directing the page as required.
If js is not available then show the ‘go’ (submit) button and if js is available hide the button and let the onchange do the work. It’s a win win situation