Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

flip box question

Posted on 2004-09-01
1
Medium Priority
?
647 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 150 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

596 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