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 );
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Dropdown events... 2
textbox Disable on value.... 2
Script Question... 4
Function... 15
Javascript Calendar help 3
DRW Submit Button... 5
Code help 3
Email without extentions 0

Top