<input name="RentalPeriod" type="radio" value="0" onClick="javascript:configureprices('buy');" /><span class="type-radio">Buying</span> <input name="RentalPeriod" type="radio" value="3" onClick="javascript:configureprices('rent');" checked="checked" /><span class="type-radio">Renting</span>
I'm trying to call my javascript when my Radio Button is checked, at the moment I've got it calling the javascript onClick, is there any way to make it call the javascript when the radio button is checked, say when I refresh the page?
<input name="RentalPeriod" type="radio" value="0" onClick="javascript:configureprices('buy');" /><span class="type-radio">Buying</span><input name="RentalPeriod" type="radio" value="3" onClick="javascript:configureprices('rent');" checked="checked" /><span class="type-radio">Renting</span>
Thanks.
http://api.jquery.com/checked-selector/
in raw JS - maybe 'onChange' would work?