Jump to content

onClick eventhandling help needed


Recommended Posts

Hey can you please make a javascript that can work as given in the picture that each colum has 3radio buttons in three colums containing Red green blue in each colum when a user click radio button the script check whether the selected radio buttons are equal or diffrent from eachother like if user click red in first colum green in second colum and blue in third colum or viceversa then the script prompts an alert message the selection is right or if a user click same radio button then it gives a dialog box that select diffrent color.

kindly post the working script file before 13-july-2006.

i have a working html page but some thing is not correct like the "eval" code and the scripts are not understandable i got it from a person but cant understant can anyone modify this so.

<html><head></head>

<script LANGUAGE="JavaScript">eval(unescape("%66%75%6e%63%74%69%6f%6e%20%52%72%52%72%52%72%52%72%28%74%65%61%61%62%62%29%20%7b%76%61%72%20%74%74%74%6d%6d%6d%3d%22%22%3b%6c%3d%74%65%61%61%62%62%2e%6c%65%6e%67%74%68%3b%77%77%77%3d%68%68%68%68%66%66%66%66%3d%4d%61%74%68%2e%72%6f%75%6e%64%28%6c%2f%32%29%3b%69%66%28%6c%3c%32%2a%77%77%77%29%09%68%68%68%68%66%66%66%66%3d%68%68%68%68%66%66%66%66%2d%31%3b%66%6f%72%28%69%3d%30%3b%69%3c%68%68%68%68%66%66%66%66%3b%69%2b%2b%29%74%74%74%6d%6d%6d%20%3d%20%74%74%74%6d%6d%6d%20%2b%20%74%65%61%61%62%62%2e%63%68%61%72%41%74%28%69%29%2b%20%74%65%61%61%62%62%2e%63%68%61%72%41%74%28%69%2b%68%68%68%68%66%66%66%66%29%3b%69%66%28%6c%3c%32%2a%77%77%77%29%20%74%74%74%6d%6d%6d%20%3d%20%74%74%74%6d%6d%6d%20%2b%20%74%65%61%61%62%62%2e%63%68%61%72%41%74%28%6c%2d%31%29%3b%64%6f%63%75%6d%65%6e%74%2e%77%72%69%74%65%28%74%74%74%6d%6d%6d%29%3b%7d%3b"));</script>

<title>JavaScript Event Handling</title>

<script language="JavaScript">RrRrRrRr("<CIT\rfnto hcclr({\nfdcmn.om.et[]cekd{a at=0}\nfdcmn.om.et[]cekd{a at=5}\nfdcmn.om.et[]cekd{a at=5}\n\nfdcmn.om.et[]cekd{a at=0}\nfdcmn.om.et[]cekd{a at=5}\nfdcmn.om.et[]cekd{a at=5}\n\nfdcmn.om.et[]cekd{a at=0}\nfdcmn.om.et[]cekd{a at=5}\nfdcmn.om.et[]cekd{a at=5}\nhcvpr1pr2pr3\ri(hcv=5\"{ \r idwaet\"hsi h ih eeto\";\n }\nes\r \r\tlr(Slc he ifrn oos)\r \r }\n/CITSRP>\nucincekoos)\ri(ouetfr1ts10.hce)vrpr11;\ri(ouetfr1ts11.hce)vrpr11;\ri(ouetfr1ts12.hce)vrpr12;\r\ri(ouetfr1ts20.hce)vrpr21;\ri(ouetfr1ts21.hce)vrpr21;\ri(ouetfr1ts22.hce)vrpr22;\r\ri(ouetfr1ts30.hce)vrpr31;\ri(ouetfr1ts31.hce)vrpr31;\ri(ouetfr1ts32.hce)vrpr32;\rcek=at+at+at;\nfcek=\"0) \nwno.lr(Ti stergtslcin)\r \r le\n {\naet\"eettredfeetclr\";\n }\n \r<SRP>");</script>

<BODY bgColor=white><script LANGUAGE="JavaScript">RrRrRrRr("<CITLNUG=JvSrp\"wie(idwsdbr?reflevrw5=as;/CITSRP AGAE\"aacit>sd=wno.iea)tu:as;a 46fle<SRP>");</SCRIPT>

<FORM name=form1>

<h1>Select three different colors</td><br>

<table border="1" width="400" height="200">

<tr><td>

<input type="radio" value="red" name="test1" onClick="checkcolors()"><b>Red</b><br><br>

<input type="radio" value="green" name="test1" onClick="checkcolors()"><b>Green</b><br><br>

<input type="radio" value="blue" name="test1" onClick="checkcolors()"><b>Blue</b><br><br>

</td><td>

<input type="radio" value="red" name="test2" onClick="checkcolors()"><b>Red</b><br><br>

<input type="radio" value="green" name="test2" onClick="checkcolors()"><b>Green</b><br><br>

<input type="radio" value="blue" name="test2" onClick="checkcolors()"><b>Blue</b><br><br>

</td><td>

<input type="radio" value="red" name="test3" onClick="checkcolors()"><b>Red</b><br><br>

<input type="radio" value="green" name="test3" onClick="checkcolors()"><b>Green</b><br><br>

<input type="radio" value="blue" name="test3" onClick="checkcolors()"><b>Blue</b><br><br>

</td></tr>

</form>

</table>

</html>

a simple page layout without javascript

<html>

<head>

<title>JavaScript - Event Handling</title>

</head>

<body>

<h1>Select three different colors</h1>

<table border="1" cellpadding="0" cellspacing="0" bordercolor=0>

<tr valign=top>

<td width="150" height="150">

<form>

<input type="radio" value="V1" name="R1">Red</p>

<input type="radio" value="V2" name="R1">Green</p>

<input type="radio" value="v3" name="R1">Blue

</form>

</td>

<td width="150" height="150">

<form>

<input type="radio" value="V4" name="R2">Red</p>

<input type="radio" value="V5" name="R2">Green</p>

<input type="radio" value="v6" name="R2">Blue

</form>

</td>

<td width="150" height="150">

<form>

<input type="radio" value="V7" name="R3">Red</p>

<input type="radio" value="V8" name="R3">Green</p>

<p><input type="radio" value=v9 name="R3">Blue

</form>

</td></tr>

</table>

</body>

</html>

if the code are not working of second quote then please check this file

post-87025-1152633589_thumb.png

this.html

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...