Solved

flip box question

Posted on 2004-09-01
1
645 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
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…
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.

691 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