Check option in select menu has been selected
Hi,
When a user clicks "Add To Basket" I need some javascript to check that the size option they have selected is not "-" in the form before the actual form is submitted.
My form is like so:
Code:
<form method="post" name="addtobasket" action="?action=add&id=<?php echo $rows['id']; ?>">
<input type="submit" class="addtobasket" name="addtobasket" value="Add To Basket">
<select name="sizechoice">
<option disabled="disabled" value="">-</option>
<option disabled="disabled" value="S">S</option>
<option disabled="disabled" value="M">M</option>
</select>
</form>
Any help would be great as I'm a php man and know nothing about javascript :)
Thanks,
Jack