Suppose we have a drop-down like for "Page2.html":
Page2.html
<div id="myDropDownLink">
<select id="first-drop" name="first-drop">
<option value="Select a State">Select a Steate</option>
<option value="NY">New York</option>
<option value="NJ">New Jersey</option>
</select>
</div>
Now, from "Page1.html", we have a link like
Page1.html
<a href="abc.html" id="mylink">go to page 1</a>
So the goal is:
on click of that link, it will go to "Page2.html" and it will select the second drop down value and will be selected. for example, it will select the second drop down value ie "NJ" one. Can we do it programmatically?
I am able to go to the specific page drop-down location. But i failed to select the second value form the drop-down.
window.location.href = forwardedWebsiteLink + "?" + "#first-drop";
Any idea which can do this?