A quick example:
<html>
<head>
</head>
<body>
<form name=form1>
<input type=radio name=r1 value="Car" checked="checked">Car
<input type=radio name=r2 value="Ley" checked="checked">Ley<br />
<input type=radio name=r1 value="Lar">Lar
<input type=radio name=r2 value="Gor">Gor<br />
<input type=radio name=r1 value="Nar">Nar
<input type=radio name=r2 value="Her">Her<br />
<br />
<input type=button value="Show selected name" onclick="getSelectedRadio()">
</form>
<script>
function getSelectedRadio()
{
var f = document.form1;
var n = ""; //name string
var o= null; //selected radio object
o=f.r1;
for(var i=0;i<o.length;i++)
if(o[i].checked)
n+=o[i].value;
o=f.r2;
for(var i=0;i<o.length;i++)
if(o[i].checked)
n+=o[i].value;
alert(n);
}
</script>
</body>
</html>
HTH,
: Ok Im wanting a script or how to make the script so that it will have like 3 options and you select one then you select from a list or 3 other options and then it will show the name at the bottom
: for example
:
: first part
: ()Car
: ()Lar
: ()Nar
:
: last part
: ()Ley
: ()Gor
: ()Her
:
: so if
:
: first part
: (X)Car
: ()Lar
: ()Nar
:
: last part
: (X)Ley
: ()Gor
: ()Her
:
: then under it, it would show
:
: Carley
:
: but if you change Ley to Her then it would be
:
: Carher
:
: so i know it has to do with variables and storage and writing but i dont know how to get the radio button things or how to set them up to do what I want. Also the text on the button wont nessarely mean that is the part to be output but make it so something else like if Car where selected it would output Frog or something else.
:
: Thanks for any help you give me.
:
: C:\Dos
: C:\Dos Run
: Run Dos Run
:
:
To err is human, but to really foul things up requires a computer. (Farmers Almanac)