|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Table within div tag does not hide
Hello
Please take a look at this code , my table does not hide: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head><TITLE>POST OFFICE BOX RENEWALS</TITLE> <META http-equiv=Content-Type content="text/html; charset=unicode"> <LINK href= "../postyle.css" type= text/css rel= stylesheet> <% dim adoCon, strSQLType,strSQLTitle,strSQLCDate, LoadUDL,RSTitle, RSBType,strSQLAmount,RSAmount dim selBType,selDes selBType=Request.form("selBType") selDes=Request.form("selDes") loadUDL = "File Name=C:\renewal\box.UDL;" 'Create an ADO connection object Set adoCon = Server.CreateObject("ADODB.Connection") adoCon.Open loadUDL strSQLType = " SELECT BOX_TYPE_CODE || ' - ' || BOX_TYPE_DESC BOX_TYPE_DESC, BOX_TYPE_CODE FROM BOX_TYPE" strSQLCDate ="SELECT YEAR FROM LAST_MONTH" strSQLTitle = " SELECT * FROM TITLE " set RSBType= adoCon.execute(strSQLType) set RSCDate= adoCon.execute(strSQLCDate) set RSTitle= adoCon.execute(strSQLTitle) strSQLDesc = " select " strSQLDesc = strSQLDesc & " description, " strSQLDesc = strSQLDesc & " amount " strSQLDesc= strSQLDesc & " from " strSQLDesc= strSQLDesc & " box_amount" strSQLDesc= strSQLDesc & " where" strSQLDesc= strSQLDesc & " box_type_code = '" & selBType & "' and" strSQLDesc= strSQLDesc & " to_number(to_char(sysdate, 'MM')) " strSQLDesc= strSQLDesc & " between start_period and end_period" set RSDescrip=adoCon.execute(strSQLDesc) strSQLAmount = " select " strSQLAmount = strSQLAmount & " amount " strSQLAmount= strSQLAmount & " from " strSQLAmount= strSQLAmount & " box_amount" strSQLAmount= strSQLAmount & " where" strSQLAmount= strSQLAmount & " box_type_code = '" & selBType & "' and" strSQLAmount= strSQLAmount & " description = '" & selDes & "' and" strSQLAmount= strSQLAmount & " to_number(to_char(sysdate, 'MM')) " strSQLAmount= strSQLAmount & " between start_period and end_period" set RSAmount= adoCon.execute(strSQLAmount) Dim actAmount if not rsAmount.eof then actAmount = rsAmount(0) else actAmount = 0 end if if selBType=2 then %> <script language=JavaScript> { showBusiness() } </script> <%else%> <script language=JavaScript> { hideBusiness() } </script> <%end if %> <script language=JavaScript script type="text/javascript"> function showBusiness() { divB.style.visibility ="visible"; } function hideBusiness() { divB.style.visibility ="hidden"; } function rePost() { rform.action = "newpo_sapriv_individ.asp"; document.rform.submit(); } </script> </head> <BODY onload=cmdFocus() > <!--#include file="../include/ValidateID.asp"--> <form name=rform action="savedetails.asp" method=post> <table border="0" width="100%" cellspacing="0" cellpadding="0" > <tr><th colspan=4><font color="yellow"><b> New Post Office Box/Bag Rental By </b></font></th></tr> <tr><th colspan=4><font color="yellow"><b> Private/Foreign Individual and Business</b></font></th></tr> <tr > <td align="right" width="40%" ><b>PO Box/Bag Number :</b></td> <td width="10%"><INPUT id=txtnBnum name=txtnBnum size="5"></td> <td align="right" width="40%"><b> Phone Area Code(w):</b> </td> <td width="10%"><INPUT id=txtnDcodeW name=txtnDcodeW size="2"></td> </tr> <tr> <td align="right" width="40%"><b>PO Box/Bag Collection Point:</b></td> <td width="10%"><INPUT id=txtBcoll name=txtnBcoll size="5"></td> <td align="right" width="40%"><b>Work Phone Number:</b></td> <td width="10%"><INPUT id=txtnTelW name=txtnTelW size="8"></td> </tr> <tr> <td align="right" width="40%"><b>PO Box/Bag Post Code:</b></td> <td width="10%"><INPUT id=txtPcode name=txtnPcode size="5"></td> <td align="right" width="40%"><b>Cell Phone Number:</b></td> <td width="10%"><INPUT id=txtnCell name=txtnCell size="8"></td> </tr> <tr> <td align="right" width="40%"><b>PO Box/Bag Type:</b></td> <td width="10%" ><SELECT id=selBType onchange="rePost()" name=selBType style="HEIGHT: 30px; WIDTH: 180px"> <option value="">Please select an option </option> <% Do While Not(RSBType.EOF) %> <OPTION value="<%=RSBType("BOX_TYPE_CODE")%>" <% if instr(selBType,RSBType("BOX_TYPE_CODE")) then %> selected <% end if %> ><%=RSBType("BOX_TYPE_DESC")%></OPTION> <% RSBType.MoveNext Loop %> </SELECT></td> <td align="right" width="40%"><b>e-Mail :</b></td> <td width="10%"><INPUT id=txtsEmail name=txtsEmail ></td> </tr> <tr> <td align="right" width="50%"><b>Description:</b></td> <td width="10%"><SELECT id=selDes name=selDes onchange="rePost()" style="HEIGHT: 30px; WIDTH: 180px"> <option value="">Please select an option </option> <% Do While Not(RSDescrip.EOF) %> <OPTION value="<%=RSDescrip("DESCRIPTION")%>"<% if instr(selDes,RSDescrip("DESCRIPTION")) then %> selected <% end if %> ><%=RSDescrip("DESCRIPTION")%></OPTION> <% RSDescrip.MoveNext Loop %> </SELECT></td> <td align="right" width="40%"><b>Street Address Line 1:</b></B></td> <td width="10%"><INPUT id=txtsAdd1 name=txtsAdd1 ></td> </tr> <tr> <td align="right" width="40%"><b>Amount for Box/Bag:</b></td> <td align="center" width="10%" bgcolor="white"><b><font color="navy">R<%=formatNumber(actAmount ,2)%></b></label> </td> <td align="right" width="40%"><b>Street Address Line 2:</b></td> <td width="10%"><INPUT id=txtsAdd2 name=txtsAdd2 ></td> </tr> <tr> <td align="right" width="40%"><b>Title:</b></td> <td width="10%"><SELECT id=selTitle name=selTitle style="HEIGHT: 30px; WIDTH: 112px"> <% Do While Not(RSTitle.EOF) %> <OPTION value="<%=RSTitle("TITLE_CODE")%>" ><%=RSTitle("TITLE_CODE")%></OPTION> <% RSTitle.MoveNext Loop %> </SELECT> </td> <td align="right" width="40%"><b>Street Address Line 3:</b></td> <td width="10%"><INPUT id=txtsAdd3 name=txtsAdd3 ></td> </tr> <tr> <td align="right" width="40%"><b>Initials:</b></td> <td width="10%"><INPUT id=txtsInitial name=txtsInitial size="1"></td> <td align="right" width="40%"><b>Suburb:</b></td> <td width="10%"><INPUT id=txtsSurburb name=txtsSurburb></td> </tr> <tr> <td align="right" width="40%"><b>Surname:</b></td> <td width="10%" colspan=2><INPUT id=txtsSurname name=txtsSurname style="HEIGHT: 22px; WIDTH: 177px" > <b>Town/City:</b></td> <td width="10%"><INPUT id=txtsTown name=txtsTown ></td> </tr> <tr> <td align="right" width="40%"> <b>ID No : </b> <input type="radio" checked name="optIdPass" value="0" > <b>Passport No:</b> <INPUT type=radio value="1" name="optIDPass" > </td> <td width="10%" ><INPUT id=txtnID name=txtnID size="11" maxlength=13></td> <td width="40%" align="right"><b>Post Code:</b></td> <td width="10%"><INPUT id=txtnPostcode name=txtnPostcode size="2"></td> </tr> <tr> <td align="right" width="40%"><b>Telephone Area Code(H):</b></td> <td width="10%"><INPUT id=txtnDcodeH name=txtnDcodeH size="2"></td> <td align="right" width="40%"><b>Telephone Number(H):</b></td> <td width="10%"><INPUT id=txtnTelH name=txtnTelH size="8"></td> </tr> <div id="divB" > <table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#cococ0" > <tr > <td align="right" width="20%"><font color="black"><b>Name of Business:</b></td> <td align="middle" width="30%"><INPUT id=BuName name=BuName size="20"></td> <td align="right" width="20%"><font color="black"><b>Fax Code:</b></td> <td align="middle" width="30%"><INPUT id=txtnFaxCode name=txtnFaxCode size="2"></td> </tr> <tr> <td align="right" width="20%"><font color="black"><b>Business Reg Number:</b></td> <td align="middle" width="30%"><INPUT id=txtRegNum name=txtRegNum size="20"></td> <td align="right" width="20%"><font color="black"><b>Fax Number:</b></td> <td align="middle" width="30%"><INPUT id=txtnFaxNo name=txtnFaxNo size="10"></td> </tr> </table> </div> <table border="0" width="100%" cellspacing="0" cellpadding="0" bordercolor="red" > <tr> <td align="right" colspan=4><b><b><input type="submit" value="Submit" name="B1" onclick=cmdCheckInputs() style="COLOR: #ff0000; FONT-WEIGHT: bold" > <input type="reset" value="Reset" name="B2" onclick=cmdclear() style="COLOR: #ff0000; FONT-WEIGHT: bold" ></b></b> </td> </tr> </table> </table> </form> <script language=Javascript script type="text/javascript" > divB.style.visibility="hidden"; </script> </BODY> </html> |
|
#2
|
||||
|
||||
|
Add the following before the <div> tag
Code:
<tr><td colspan=4> <div id="divB" >....... //snip// ......</div> </td></tr>
__________________
Hawk - The flightless Kiwi bird Did I help you out? Click the and agree.
|
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Table within div tag does not hide |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|