Solved

flip box question

Posted on 2004-09-01
1
642 Views
Last Modified: 2008-03-10
Hi,

I've got the code below, its working fine, but when the page is displayed it shows the content in full.   When you press on the square box the content is hidden.  I would like the content to be hidden, when the square box is selected, it should display the content in full.

Hope someone could help.


<html><head><title>Info Box: LM17A 17" LCD Monitor silver/black with Multimedia</title><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><link rel="stylesheet" href="file:///D|/sites/planet-tech/add-ins/css.css" type="text/css">
<script language="JavaScript1.2" src="file:///D|/sites/planet-tech/add-ins/scr.js"></script>
<script language="JavaScript">
      function toPageAvail(coden){
                     document.SavaInfo.CodeToUpdate.value=coden;
                  document.SavaInfo.submit();
        }
        function closeInfo(url) {
          window.opener.location = url;
          window.opener.focus();
          window.close();
      }
        function newbox(){newpage = window.open('stockbox.asp', 'newpage', 'height=450,width=575,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0,dependant=1,alwaysRaised=1');}
        function fbox(url){newpage = window.open(url, 'fdetail', 'height=450,width=575,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0,dependant=1,alwaysRaised=1'); newpage.focus();}
        function duhaiGo(){ y = 1978 }
        function flipBox(who) {
        var tmp;
              if (document.images["b_" + who].src.indexOf("_off") == -1) {
                  tmp = document.images["b_" + who].src.replace("_on", "_off");
                  document.getElementById('box_' + who).style.display = "none";
                  document.images["b_" + who].src = tmp;
            } else {
                  tmp = document.images["b_" + who].src.replace("_off", "_on");
                  document.getElementById('box_' + who).style.display = "block";
                  document.images["b_" + who].src = tmp;
            }
        }
        self.focus();
</script></head><body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<TABLE border=0 cellspacing=0 cellpadding=0 width="100%" height="100%">
  <!--DWLayoutTable-->
  <TR>
    <TD width="783" height="179" valign="top">
      <TABLE width="100%" border="0">
        <TR>
          <TD colspan="2" background="file:///D|/sites/planet-tech/gfx/dotsline.gif"></TD>
        </TR>
        <TR>
          <TD bgcolor="#ECECF2"><FONT face="Verdana, Arial, Helvetica, sans-serif" class="s8"><B>&nbsp;Description</B></FONT></TD>
          <TD width="10" bgcolor="#DDDDE8"><FONT face="Verdana, Arial, Helvetica, sans-serif" class="s8"><B><A href="javascript: flipBox('desc85')"><IMG name='b_desc85' src="file:///D|/sites/planet-tech/gfx/boxsw_off.gif" width="15" height="14" border="0"></A></B></FONT></TD>
        </TR>
        <TR>
          <TD colspan="2" background="file:///D|/sites/planet-tech/gfx/dotsline.gif"></TD>
        </TR>
      </TABLE>
      <DIV id="box_desc85">
        <TABLE width="100%" border="0" cellspacing="0" cellpadding="10" class="s8">
          <TR>
            <TD><b>85&nbsp;&nbsp;HSBCas </b></TD>
          </TR>
        </TABLE>
      </DIV>
     
      <TABLE width="100%" border="0">
        <TR>
          <TD colspan="2" background="file:///D|/sites/planet-tech/gfx/dotsline.gif"></TD>
        </TR>
        <TR>
          <TD bgcolor="#ECECF2"><FONT face="Verdana, Arial, Helvetica, sans-serif" class="s8"><B>&nbsp;Description</B></FONT></TD>
          <TD width="10" bgcolor="#DDDDE8"><FONT face="Verdana, Arial, Helvetica, sans-serif" class="s8"><B><A href="javascript: flipBox('desc86')"><IMG name='b_desc86' src="file:///D|/sites/planet-tech/gfx/boxsw_off.gif" width="15" height="14" border="0"></A></B></FONT></TD>
        </TR>
        <TR>
          <TD colspan="2" background="file:///D|/sites/planet-tech/gfx/dotsline.gif"></TD>
        </TR>
      </TABLE>
      <DIV id="box_desc86">
        <TABLE width="100%" border="0" cellspacing="0" cellpadding="10" class="s8">
          <TR>
            <TD><b>86&nbsp;&nbsp;0</b></TD>
          </TR>
        </TABLE>
      </DIV>
     
     
</BODY></HTML>
0
Comment
Question by:heyme
1 Comment
 
LVL 15

Accepted Solution

by:
joeposter649 earned 50 total points
ID: 11967629
Change your <div>'s to default to be hidden on default...
DIV id="box_desc85" style="display:none">
&
<DIV id="box_desc86" style="display:none">
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
This video teaches users how to migrate an existing Wordpress website to a new domain.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question