Solved

flip box question

Posted on 2004-09-01
1
639 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This video teaches users how to migrate an existing Wordpress website to a new domain.

912 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now