javascript check form for radio group
<p>HiExperts,</p>

<p>I am creating a form with a javascript validation function for a radio group. The idea is, when "None" is checked, no div pop up, and when "Monday" or "Tuesday" is checked, a div pop up:-</p>

<pre><code>//the form
&lt;form name="form_sf" id = "form_sf" method="post" action="process.php" onSubmit="return check_sf_form_info(form_sf,'all')"&gt;

&lt;input name="date" id="date" type="radio" value="nil" onChange="check_sf_form_info(form_sf,2)" /&gt;None

&lt;input name="date" id="date" type="radio" value="mon" onChange="check_sf_form_info(form_sf,2)" /&gt;Monday

&lt;input name="date" id="date" type="radio" value="tue"  onChange="check_sf_form_info(form_sf,2)" /&gt;Tuesday

&lt;/form&gt;

//the javascript

function check_sf_form_info(form,mark,edit){
        if(mark==2 || mark=="all"){
     if(form.date.value!=="nil"){
       price.innerHTML="$100";
       price.style.display="block";
       price.style.height="auto";
     }else{
       price.innerHTML="";
       price.style.display = "none";       
     }
   }
}
</code></pre>

<p>Would experts please teach me where I have done wrongly? Thanksalot!</p>
