473,394 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Hidden table row probs

Can I hidden the selected table row like this
Expand|Select|Wrap|Line Numbers
  1. <div style="display:none;" id="CheckCountry">    
  2. <tr><%
  3. Set RS = Server.CreateObject ("ADODB.Recordset")
  4. rs.Open "Select Region,StateDesc FROM tblState ORDER BY StateDesc", OBJdbConnection, 3,  3
  5. %>
  6.     <td>Negeri Kelahiran</td>
  7.     <td colspan="3">:
  8.     <select id="State" name="State"> 
  9.     <option VALUE="N/A" SELECTED>--__________________--</option>
  10.     <%do while not rs.EOF
  11.     %>
  12.     <option value="<%=rs("Region")%>" <%if rs("Region")=session("Negeri_Kelahiran") then Response.Write("selected='Selected'")%>> <%=rs("StateDesc")%></option>
  13.     <%
  14.     rs.movenext
  15.     loop
  16.     rs.close
  17.     %>
  18.     </select></td>
  19. </tr></div>
or is't I have to use div class....If yes..how to call css property outside this page
Oct 17 '08 #1
5 4902
DrBunchman
979 Expert 512MB
Hi MATTXtwo,

You can't use a div inside a table as you have done above.

If you wish to hide the selected row then you can use the table row tags display property like this:

Expand|Select|Wrap|Line Numbers
  1. <tr style="display:none;">
  2. <td>This should be hidden!</td>
  3. </tr>
Does this help at all?

Dr B
Oct 17 '08 #2
but i want to have it hidden and unhidden to certain occasion...
i think ifound the solution by using css class to hide/unhide element
Oct 19 '08 #3
on the <tr> I have typein the syntax
Expand|Select|Wrap|Line Numbers
  1. ").style.display = "none";
How to change the syntax to
Expand|Select|Wrap|Line Numbers
  1. ").style.display = "block";
Oct 20 '08 #4
danp129
323 Expert 256MB
on the <tr> I have typein the syntax
Expand|Select|Wrap|Line Numbers
  1. ").style.display = "none";
How to change the syntax to
Expand|Select|Wrap|Line Numbers
  1. ").style.display = "block";
Expand|Select|Wrap|Line Numbers
  1. <script language="javascript">
  2. function ToggleThisRow(rowid) {
  3.   var row=document.getElementById(rowid);
  4.   if (row.style.display=='none') {
  5.     row.style.display='block';
  6.   } else {
  7.     row.style.display='none';
  8.   }
  9. }
  10. </script>
  11.  
  12. <input type="button" value="click to toggle" onclick="ToggleThisRow('mysometimeshiddenrow1');">
  13. <table>
  14.   <tr>
  15.     <td>always visible</td>
  16.    </tr>
  17.   <tr id="mysometimeshiddenrow1" style="display: none">
  18.     <td>hidden by default</td>
  19.   </tr>
  20. </table>
Oct 20 '08 #5
Thanks but some logical error on my way...
what on html event that I can do to load function on javascript...
I mean event like onload or etc.. by doing that I can makesure some procedure to execute the hidden or unhidden the element
Oct 20 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: yurps | last post by:
Hello here is my html, if you click the missing image in the first column on the left, the div is shown, when clicked again the div disappears...but the bottom border disappears as well...Is there...
2
by: Jon | last post by:
Hi all, I am trying to create a page that contains a number of div elements, with links on the left side of the page allowing the user to select which div to display. Some of the pages contain...
3
by: Itai | last post by:
I have an aspx file named index.aspx which contains two ‘form' sections, one that has the runat=server attribute (e.g From1) and one which is a regular HTML form (e.g SignInForm). I am trying...
1
by: pemigh | last post by:
I'm almost done with an application, and trying to lock it down tightly. But I still want users to be able to point to a new location for the data file. The code below fires off to detect and...
2
by: avanti | last post by:
Hi, I have some JavaScript code in an ASP page that shows or hides a table whenever a radio button is checked or unchecked. I use the table.style.dispay property to do this. However, in some...
2
by: esteuart | last post by:
I need to get the right combination for a div to clip any text inside and allow vertical alignment. I only have this problem in FireFox. I have 3 divs nested within each other. The outer div has...
2
underscore
by: underscore | last post by:
hi... to all good guys... am here again sharing a simple probs in php to all genius people in PHP. i design a web page using dreamweaver. when i use a table or text box i use first a layer and...
1
by: selvialagar | last post by:
i have two select boxes in my form named month and year...when i selected these two things, there is a submit button called 'generate invoice'. when i click this, invoice report is generated as a...
2
by: froilan03 | last post by:
Hi, Please help me to solve this one. I have page with tables (including hidden tables), my problem is how can I copy both the content of the table. Here is my code snippets: function...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.