I have a dropdown menu and I want to disable/enable a button on my page when a certain value is selected. It works in All browsers but IE7 and below. Work around????
Code:
<script type="text/javascript">
$(document).ready(function() {
//Start Buttons
$(".nextbutton").button({ disabled: true });
(".nextbutton").click(function() { $("#phonetypeform").submit() });
//Enable Next Step
$('.enablenext').click(function(){
$(".nextbutton").button("enable");
});
//Disable Next Step
$('.disablenext').click(function(){
$(".nextbutton").button("disable");
});
});
</script>
<form>
<select name="porting-p1"class="dropdown">
<option value="" class="disablenext">Please select an option...</option>
<option value="1" class="enablenext">I want to keep my current phone number</option>
<option value="2" class="enablenext">I want to choose a new number</option>
</select>
</form>
<button class="nextbutton">Next Step</button>