Validation working in everything except IE

I have some basic form validation that works in chrome, mozilla, and safari, but when I run the page in IE explorer the validation throws my error for every variable that has get .value

The error triggers if the radio is not selected, but a dropdown option other than ‘none’ is checked

Any idea what I can do to make it work in IE

function isValid(){
    var ws = document.getElementById('ws').value;
    var wsrefill = document.getElementById('wsrefill').value;

    if (ws != "" && wsrefill == "None"){
        return false;

below is the main parts of my html

<form onSubmit="return isValid();" name="order_form" id="order_form" method="post" >
<td colspan="2"><label><input type="radio" name="ws" id="ws" value="ws1" /> WS #1</label></td>
<td colspan="2"><label><input type="radio" name="ws" id="ws" value="ws2" /> WS #2</label></td>
<td colspan="4">
    <select name="wsrefill" id="wsrefill">
        <option value="None">Please Select</option>
        <option value="0">0</option>
        <option value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
        <option value="5">5</option>
        <option value="1 Year">1 year</option>
<input type="submit" onClick="isValid();"/>

Source: cross-browser

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.