Radio Button Click

[Total: 0    Average: 0/5]

What to click on a radio button and get re-directed to another web page?

Body Code:

<script>
function getMessage(who)
{
     /*
 uncomment if you want it to auto detect your web site and path
     loc = self.location
     document.exf1.translate.value = loc
 */
     loc = document.exf1.translate.value
     k = loc.lastIndexOf('/')
     loc = loc.substring(0,k+1)
     nloc = loc.substring(0,k+1)+ who.value + '.php'
     top.location=nloc
}
</script>
<CENTER>
<FONT SIZE=4 COLOR='darkslateblue'><B>Click any Button to go to this file</B></FONT><BR>
</CENTER>
<CENTER>
<FORM name=exf1>
<TABLE BORDER ALIGN=CENTER><TR><TD>
<INPUT TYPE=radio NAME='getMsgR' VALUE='index' 
     onClick='getMessage(this)'>Index
<INPUT TYPE=radio NAME='getMsgR' VALUE='index' 
     onClick='getMessage(this)'>Index2a
<INPUT TYPE=radio NAME='getMsgR' VALUE='index' 
     onClick='getMessage(this)'>Index2
<INPUT TYPE=radio NAME='getMsgR' VALUE='index' 
     onClick='getMessage(this)'>Index2a
<INPUT TYPE=radio NAME='getMsgR' VALUE='index' 
     onClick='getMessage(this)'>Index2
<INPUT TYPE=hidden NAME='translate' VALUE='http://www.js-examples.com/' >
</TD></TR></TABLE>
</FORM>
</CENTER>

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *