- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsI am trying to create a user defined (branching) form. The firs tquestion will appear and the second question will depend on the answer to the first. The first question is a radio button with a yes or now response so I need to be able to give one question if they answer yes and another if they answer no. Then depending on what they answer for question 2 I will have two choices for question three and son on.
I would appreciate any help.
judo2000
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: lil_puffballPosted on 2004-05-18 at 19:01:04ID: 11104012
Here's a quick example:
div'); =='radio') { alue+"');" ); cument.all [n]:docume nt.getElem entById(n) ;return n;} none';clea r(n+i+"-") ;i++; eturn;} xOf('-')+1 );
</span>
;</span>
;</span>
</span>
<script>
window.onload=function(){
var f=document.forms[0];
var s=f.getElementsByTagName('
for(var i=0;i<f.length;i++){
if(f[i].type.toLowerCase()
f[i].onclick=new Function("choose('"+f[i].v
}
}
for(var i=0;i<s.length;i++){
s[i].style.display='none';
}
}
function choose(n){
function getEl(n){n=document.all?do
function clear(n){
var i=1;
while(getEl(n+i)){
getEl(n+i).style.display='
}
}
var o=getEl('sect'+n);if(!o){r
var m=n.substring(0,n.lastInde
clear('sect'+m);
o.style.display='inline';
}
</script>
<form>
<input type=radio name='rad0' value='1'>Option 1
<input type=radio name='rad0' value='2'>Option 2
<div id='sect1'>
<br><span style='width:50px;'>
<input type=radio name='rad1' value='1-1'>Option A
<input type=radio name='rad1' value='1-2'>Option A
</div>
<div id='sect1-1'>
<br><span style='width:100px;'> 
<input type=radio name='rad1-1'>Option (i)
<input type=radio name='rad1-1'>Option (ii)
<input type=radio name='rad1-1'>Option (iii)
</div>
<div id='sect1-2'>
<br><span style='width:100px;'> 
Options in section 1-2
</div>
<div id='sect2'>
<br><span style='width:50px;'>
Options in section 2
</div>
</form>