Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Senior Coder crmpicco's Avatar
    Join Date
    Jan 2005
    Location
    Mauchline, Scotland
    Posts
    1,097
    Thanks
    15
    Thanked 1 Time in 1 Post

    Angry change <td> value onClick

    Code:
    <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?

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Try this example


    PHP Code:
    <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
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •