Results 1 to 4 of 4

Thread: Please help, whats wrong with code?!

  1. #1

    Thread Starter
    Hyperactive Member Sacofjoea's Avatar
    Join Date
    May 2000
    Location
    Never Never Land
    Posts
    472

    Please help, whats wrong with code?!

    Code:
    <html>
    <head>
    <script language="JavaScript">
    <!--
    var head="display:''"
    function doit(header){
    	var head=header.style
    	if (head.display=="none")
    		head.display=""
    	else
    		head.display="none"
    }
    //-->
    </script>
    </head>
    <body bgcolor="#000000" text="#FFFFFF" link="#6699FF" vlink="#6699CC" alink="#6699FF"')" oncontextmenu="return false" ondragstart="return false" onselectstart="return false">
    <H5 style="cursor:hand" onclick="doit(document.all[this.sourceIndex+1])"><font face="Geneva, Arial, Helvetica">Drum 
      Kits</font></H5>
    <SPAN style="display: none">
    <table width="35%" border="0">
      <tr> 
        <td width="16%">&nbsp;</td>
        <td width="84%"><font face="Geneva, Arial, Helvetica" size="2"><i>Here are 
          some kits I took from my Yamaha DX series module. They range from acoustic 
          to hip-hop sounding.</i></font></td>
      </tr>
      <tr> 
        <td width="16%"><img src="test.gif" width="25" height="22"></td>
        <td width="84%"><font face="Geneva, Arial, Helvetica" size="2"><i>Kit 1</i></font></td>
      </tr>
      <tr> 
        <td width="16%"><img src="test.gif" width="25" height="22"></td>
        <td width="84%"><font face="Geneva, Arial, Helvetica" size="2"><i>Kit 2</i></font></td>
      </tr>
      <tr> 
        <td width="16%"><img src="test.gif" width="25" height="22"></td>
        <td width="84%"><font face="Geneva, Arial, Helvetica" size="2"><i>Kit 3</i></font></td>
      </tr>
      <tr> 
        <td width="16%"><img src="test.gif" width="25" height="22"></td>
        <td width="84%"><font face="Geneva, Arial, Helvetica" size="2"><i>Kit 4</i></font></td>
      </tr>
      <tr> 
        <td width="16%"><img src="test.gif" width="25" height="22"></td>
        <td width="84%"><font face="Geneva, Arial, Helvetica" size="2"><i>Kit 5</i></font></td>
      </tr>
      <tr> 
        <td width="16%"><img src="test.gif" width="25" height="22"></td>
        <td width="84%"><font face="Geneva, Arial, Helvetica" size="2"><i>Kit 6</i></font></td>
      </tr>
      <tr> 
        <td width="16%"><img src="test.gif" width="25" height="22"></td>
        <td width="84%"><font face="Geneva, Arial, Helvetica" size="2"><i>Kit 7</i></font></td>
      </tr>
      <tr>
        <td width="16%"><img src="test.gif" width="25" height="22"></td>
        <td width="84%"><font face="Geneva, Arial, Helvetica" size="2"><i>Kit 8</i></font></td>
      </tr>
    </table>
    </SPAN>
    </body>
    </html>
    its supposed to hide everything within the <SPAN> yet it does not..and im following the example directly from:
    http://home.mweb.co.za/gs/gslennox/w.../contract.html

    What the heck is wrong?!?LKJLds

  2. #2

    Thread Starter
    Hyperactive Member Sacofjoea's Avatar
    Join Date
    May 2000
    Location
    Never Never Land
    Posts
    472
    ok well, apparently the heading wont allow you to specify a font without screwing up.. anyone have an alternative to this? or better way to do it?

  3. #3
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Cascading Style Sheets (CSS)
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  4. #4
    Lively Member
    Join Date
    Jul 2001
    Location
    USA
    Posts
    95
    <html>
    <head>

    <script language="JavaScript">
    <!--
    var layers = document.all['span1'];
    function doit(){
    if (span1.style.display == "none")
    span1.style.display = "block"
    else
    span1.style.display = "none"
    }
    //-->
    </script>
    </head>
    <body bgcolor="#000000" text="#FFFFFF" link="#6699FF" vlink="#6699CC" alink="#6699FF"')" oncontextmenu="return false" ondragstart="return false" onselectstart="return false">
    <H5 style="cursor:hand" onclick="doit()"><font face="Geneva, Arial, Helvetica">Drum
    Kits</font></H5>
    <SPAN id="span1" style="display: none">
    <table width="35%" border="0">
    <tr>
    <td width="16%"> </td>
    <td width="84%"><font face="Geneva, Arial, Helvetica" size="2"><i>Here are
    some kits I took from my Yamaha DX series module. They range from acoustic
    to hip-hop sounding.</i></font></td>
    </tr>
    <tr>
    <td width="16%"><img src="test.gif" width="25" height="22"></td>
    <td width="84%"><font face="Geneva, Arial, Helvetica" size="2"><i>Kit 1</i></font></td>
    </tr>
    <tr>
    <td width="16%"><img src="test.gif" width="25" height="22"></td>
    <td width="84%"><font face="Geneva, Arial, Helvetica" size="2"><i>Kit 2</i></font></td>
    </tr>
    <tr>
    <td width="16%"><img src="test.gif" width="25" height="22"></td>
    <td width="84%"><font face="Geneva, Arial, Helvetica" size="2"><i>Kit 3</i></font></td>
    </tr>
    <tr>
    <td width="16%"><img src="test.gif" width="25" height="22"></td>
    <td width="84%"><font face="Geneva, Arial, Helvetica" size="2"><i>Kit 4</i></font></td>
    </tr>
    <tr>
    <td width="16%"><img src="test.gif" width="25" height="22"></td>
    <td width="84%"><font face="Geneva, Arial, Helvetica" size="2"><i>Kit 5</i></font></td>
    </tr>
    <tr>
    <td width="16%"><img src="test.gif" width="25" height="22"></td>
    <td width="84%"><font face="Geneva, Arial, Helvetica" size="2"><i>Kit 6</i></font></td>
    </tr>
    <tr>
    <td width="16%"><img src="test.gif" width="25" height="22"></td>
    <td width="84%"><font face="Geneva, Arial, Helvetica" size="2"><i>Kit 7</i></font></td>
    </tr>
    <tr>
    <td width="16%"><img src="test.gif" width="25" height="22"></td>
    <td width="84%"><font face="Geneva, Arial, Helvetica" size="2"><i>Kit 8</i></font></td>
    </tr>
    </table>
    </SPAN>
    </body>
    </html>

Posting Permissions

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



Click Here to Expand Forum to Full Width