Is this correct or what do I need to change in this javascript IF

F

Frank H. Shaw

<Script>

IF <input type="submit" onclick="alert('Radio index = ' +
indexRadio(this.form.myRadio);); return true;" >

ENDIF

</script>


function indexRadio(theRadio) {
var i;
for (i = 0; i < theRadio.length ; i++) {
if (theRadio.checked) return i );
}
}
 
R

Ronx

See my example at www.rxs-enterprises.org/tests/pages/prices.htm
--
Ron Symonds
Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.

Frank H. Shaw said:
<Script>

IF <input type="submit" onclick="alert('Radio index = ' +
indexRadio(this.form.myRadio);); return true;" >

ENDIF

</script>


function indexRadio(theRadio) {
var i;
for (i = 0; i < theRadio.length ; i++) {
if (theRadio.checked) return i );
}
}
 
Top