Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How'd they do it in Hotmail ?

form elements

How'd they do it in Hotmail ?

by  Deadline  Posted    (Edited  )
This can be considered as the answer for thread216-115278 which goes by the title "How'd they do it in hotmail ?"

You can use the following function :
Code:
function CHKD(E) {
if(E.checked) 
(E.parentElement).parentElement.style.backgroundColor ='#EEEEEE'; 
else	{
 (E.parentElement).parentElement.style.backgroundColor ='GHOSTWHITE'; 	}
}
Whereas, while creating a checkbox, you can use this (this means, similar to this in ASP or ColdFusion or Static HTML):
Code:
<Table ID=tbl>
<TBODY ID=a1 BGCOLOR=GHOSTWHITE>
<TR id=1 ALIGN=CENTER>
<TD ALIGN=CENTER>
<input type=CHECKBOX ID=chk name=chk value="0"  LANGUAGE=javascript onclick="return CHKD(this)">
</TD></TR>
</TBODY>

<TBODY ID=a2 BGCOLOR=GHOSTWHITE>
<TR id=2 ALIGN=CENTER>
<TD ALIGN=CENTER>
<input type=CHECKBOX ID=chk name=chk value="1"  LANGUAGE=javascript onclick="return CHKD(this)">
</TD></TR>
</TBODY>
</table>

Check it out and enjoy....
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top