...

View Full Version : change <td> value onClick



crmpicco
08-19-2005, 05:11 PM
<td height="20" bordercolor="#000000" align="center" bgcolor="#006699" colspan="3"
onClick="javascript: document.form.all.value='all'; var all; all=true; setVal(<%=iCounter%>,'all','td');"
onMouseOver="this.bgColor = '#C0C0C0'; this.style.color='#000000'; style.cursor='hand'; window.status='';"
onMouseOut="this.bgColor = '#006699'; this.style.color='#FFFFFF';window.status='';">
<font face="verdana" size="-2" color="#FFFFFF" onmouseover="this.style.color='#000000';window.status='';" onmouseout="this.style.color='#FFFFFF'">
Check All
</font>
</td>

is there a way to change 'Check All' to 'Uncheck All' onClick?

Mr J
08-19-2005, 08:10 PM
Try this example



<td height="20" bordercolor="#000000" align="center" bgcolor="#006699" colspan="3" onClick="document.getElementById('div1').innerHTML='Uncheck All'" onMouseOver="this.bgColor = '#C0C0C0'; this.style.color='#000000'; style.cursor='hand'; window.status='';" onMouseOut="this.bgColor = '#006699'; this.style.color='#FFFFFF';window.status='';">
<div id="div1" style="font-family:verdana;font-size:65%;color:#FFFFFF" onmouseover="this.style.color='#000000';window.status='';" onmouseout="this.style.color='#FFFFFF'">
Check All
</div>
</td>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum