Jump to content

onClick


maxudaskin

Recommended Posts

<td width="33%" height="20" align="center" valign="middle" class="cursor_link" style="background:url(../images/admin_tab_L.jpg)" onclick="newapps.style.class='uncollapsedtable'" onclick="filedflights.style.class='collapsedtable'" onclick="messages.style.class='collapsedtable'" onMouseOver="this.style.background='url(../images/admin_tab_L_hvr.jpg)'" onMouseOut="this.style.background='url(../images/admin_tab_L.jpg)'">

 

It does not seem to be working... any ideas?

 

CSS:

.collapsedtable{
visibility:collapse;
}
.uncollapsedtable{
visibility:visible;
}

 

FULL SCRIPT:

<table onload="MM_preloadImages('../images/admin_tab_C_hvr.jpg','../images/admin_tab_L_hvr.jpg','../images/admin_tab_R_hvr.jpg','../images/admin_tab_C.jpg','../images/admin_tab_R.jpg','../images/admin_tab_L.jpg')" width="98%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="33%" height="20" align="center" valign="middle" class="cursor_link" style="background:url(../images/admin_tab_L.jpg)" onclick="newapps.style.class='uncollapsedtable'" onclick="filedflights.style.class='collapsedtable'" onclick="messages.style.class='collapsedtable'" onMouseOver="this.style.background='url(../images/admin_tab_L_hvr.jpg)'" onMouseOut="this.style.background='url(../images/admin_tab_L.jpg)'"><div class="middle_vallign" style="color:#FFFFFF; height:100%; vertical-align:middle;">New Applicants</div></td>
    <td width="33%" height="20" align="center" valign="middle" class="cursor_link" style="background:url(../images/admin_tab_C.jpg)" onMouseOver="this.style.background='url(../images/admin_tab_C_hvr.jpg)'" onMouseOut="this.style.background='url(../images/admin_tab_C.jpg)'"><div class="middle_vallign" style="color:#FFFFFF; height:100%; vertical-align:middle;">Filed Flights</div></td>
    <td width="34%" height="20" align="center" valign="middle" class="cursor_link" style="background:right url(../images/admin_tab_R.jpg)" onMouseOver="this.style.background='right url(../images/admin_tab_R_hvr.jpg)'" onMouseOut="this.style.background='right url(../images/admin_tab_R.jpg)'"><div class="middle_vallign" style="color:#FFFFFF; height:100%; vertical-align:middle;">Messages</div></td>
  </tr>
  <tr>
    <td colspan="3" bgcolor="#333355"><table width="100%" border="0" cellpadding="0" cellspacing="1" id="newapps">
        <tr>
          <td bgcolor="#FFFFFF"> </td>
        </tr>
        </table>      <table width="100%" border="0" cellpadding="0" cellspacing="1" id="filedflights">
        <tr>
          <td bgcolor="#FFFFFF"><br /></td>
        </tr>
          </table><table width="100%" border="0" cellpadding="0" cellspacing="1" id="messages">
        <tr>
          <td bgcolor="#FFFFFF"><br /></td>
        </tr>
          </table></td>
  </tr>
</table>

Link to comment
Share on other sites

 

<style type="text/css">
.collapsedtable {
visibility:collapse;
}
.uncollapsedtable{
visibility:visible;
}
</style>

<script language="javascript">
function show(num1,num2,num3)
{
document.getElementById(num1).className="uncollapsedtable";
document.getElementById(num2).className="uncollapsedtable";
document.getElementById(num3).className="uncollapsedtable";
}
</script>

<table onload="MM_preloadImages('../images/admin_tab_C_hvr.jpg','../images/admin_tab_L_hvr.jpg','../images/admin_tab_R_hvr.jpg','../images/admin_tab_C.jpg','../images/admin_tab_R.jpg','../images/admin_tab_L.jpg')" width="98%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="33%" height="20" align="center" valign="middle" class="cursor_link" style="background:url(../images/admin_tab_L.jpg)" onclick="show('newapps','filedflights','messages')" onMouseOver="this.style.background='url(../images/admin_tab_L_hvr.jpg)'" onMouseOut="this.style.background='url(../images/admin_tab_L.jpg)'"><div class="middle_vallign" style="color:#FFFFFF; height:100%; vertical-align:middle;">New Applicants</div></td>
    <td width="33%" height="20" align="center" valign="middle" class="cursor_link" style="background:url(../images/admin_tab_C.jpg)" onMouseOver="this.style.background='url(../images/admin_tab_C_hvr.jpg)'" onMouseOut="this.style.background='url(../images/admin_tab_C.jpg)'"><div class="middle_vallign" style="color:#FFFFFF; height:100%; vertical-align:middle;">Filed Flights</div></td>
    <td width="34%" height="20" align="center" valign="middle" class="cursor_link" style="background:right url(../images/admin_tab_R.jpg)" onMouseOver="this.style.background='right url(../images/admin_tab_R_hvr.jpg)'" onMouseOut="this.style.background='right url(../images/admin_tab_R.jpg)'"><div class="middle_vallign" style="color:#FFFFFF; height:100%; vertical-align:middle;">Messages</div></td>
  </tr>
  <tr>
    <td colspan="3" bgcolor="#333355"><table width="100%" border="0" cellpadding="0" cellspacing="1" id="newapps" class="collapsedtable">
        <tr>
          <td bgcolor="#FFFFFF"> </td>
        </tr>
        </table>      <table width="100%" border="0" cellpadding="0" cellspacing="1" id="filedflights" class="collapsedtable">
        <tr>
          <td bgcolor="#FFFFFF"><br /></td>
        </tr>
          </table><table width="100%" border="0" cellpadding="0" cellspacing="1" id="messages" class="collapsedtable">
        <tr>
          <td bgcolor="#FFFFFF"><br /></td>
        </tr>
          </table></td>
  </tr>
</table>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.