Forums

[Solved] ChronoForm JavaScript question

WhiteLighter01 19 Oct, 2011
Hi all,

I'm new to javascript and chronoform. I'm having some problem implementing JavaScript on my form. What I am trying to do is to automatically have a radio button selected automatically if the user selected something from the dropdown box.

here's the code I have on the Form HTML
 <fieldset>
<label><input type="radio" name="subject" id="Questions" value="Questions">Questions</label>
<select name="questions" id="questions" onchange="radioSelect()">
<option value="">I have a question about...</option>
<option value="101">How to edit my account?</option>
<option value="102">How to post pictures?</option>
<option value="103">What is the allowed picture size?</option>
<option value="104">How can I invite others?</option>
<option value="199">Something else</option>
</select>
</fieldset>


and I have this on the Form JavaScript
function radioSelect(){
	document.getElementById("Questions").checked = true;
}


I have tested it on a regular HTML page and it's working properly but somehow it doesn't work on chronoform.
WhiteLighter01 20 Oct, 2011
Update: When I went in and checked it this morning, the javascript is working properly without any changes. Still don't know why it won't work yesterday.
GreyHead 20 Oct, 2011
Hi WhiteLighter01,

Your code works OK in a test from here. There may be some other JavaScript error on the page that is stopping it. Please post a link to the form so I can take a quick look.



Bob
This topic is locked and no more replies can be posted.