How do i go about creating some JQuery code which will change the selected value of an menu.
On my page i have created a drop down menu like so:
<select id="select_Day">
<option value="Monday">Monday</option>
<option value="Tuesday">Tuesday</option>
<option value="Wednesday">Wedsnesday</option>
<option value="Thursday">Thursday</option>
<option value="Friday">Friday</option>
<option value="Saturday">Saturday</option>
<option value="Sunday">Sunday</option>
</select>
The page i have the menu on is then being passed values from a form on another page, below is how i retrieve the values:
<?php
$day = $_GET['day'];
?>
I then copy the values of the PHP variables to some javascript variables:
$(document).ready(function(event){
var day = <?php echo $day ?>;
});
How would i then change the drop-down menus selected value to that of the $day variable, so for example, if the page is passed the value 'Friday' how would i then have that option as the selected choice?