Solved

flip box question

Posted on 2004-09-01
1
638 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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

772 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

11 Experts available now in Live!

Get 1:1 Help Now