473,803 Members | 3,616 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<div style:visibilit y="hidden">

3 New Member
Hi,
I am dynamically generating a html file which will contain only <div> tags which contents are hidden from user( set by style="visibili ty:hidden")
Now the next step is i am enabling some of these tags by setting style="visible" here the problem is, the hidden items also occupy the space on html form is there any other ways such that all the content should present on html form in hidden form and run time I can make visible some of them as per requirement thru javascript?
Jan 12 '07 #1
7 201554
snowdonkey
37 New Member
CSS "visibility " property hides an element but retains its space in the flow of the document. If you want to remove an element from the flow of a document (not just make it invisible, but allocate its space to other elements, which is what I think you want to do) then use "display: none".
Jan 12 '07 #2
parag1234567
3 New Member
Hi,

Doc-1:
<div style="visibili ty:hidden">Line 1</div>
<div style="visibili ty:hidden">Line 2</div>
<div style="visibili ty:hidden">Line 3</div>
<div style="visibili ty:hidden">Line 4</div>
<div style="visibili ty:hidden">Line 5</div>
Jan 12 '07 #3
parag1234567
3 New Member
Hi,
My code is like,

File--> doc1.html

<div style="visibili ty:hidden">Line 1</div>
<div style="visibili ty:hidden">Line 2</div>
<div style="visibili ty:hidden">Line 3</div>
<div style="visibili ty:hidden">Line 4</div>
<div style="visibili ty:hidden">Line 5</div>

File --> doc2.shtml

This file will include all the content of above html file under body tag using Shtml include tag.
A java script function will make the Line1 and Line4 visible.

Now my target is to show the visible lines one by one. In current situation it appears as:

Line1
<blank>
<blank>
Line4
<blank>


Is there any alternative to this implementation?
Please guide me..
Thanks
-Parag
Jan 12 '07 #4
drhowarddrfine
7,435 Recognized Expert Expert
Perhaps you can do the same for each line. Identify each line with an id or class and turn each one on/off as required. Such as:

<div id="para1">
<p id="line1">Line 1</p>
<p id="line2">Line 2</p>
</div>

Then you can turn each line on/off using javascript and display:none or hidden as required, if I'm following this all correctly.

That can become a little complicated if it gets too big but you might give it more thought than I can right now.
Jan 12 '07 #5
AricC
1,892 Recognized Expert Top Contributor
Using javascript you can do this:
[html]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Test</title>
<script type="text/javascript">
function dispHandle(obj)
{
if (obj.style.disp lay == "none")
obj.style.displ ay = "";
else
obj.style.displ ay = "none";
}

</script>
</head>

<body>
<div id="HideShow">H ello World!</div>
<a href="javascrip t:dispHandle(Hi deShow)">Hide Show</a>

</body>
</html>
[/html]
Jan 12 '07 #6
oranoos3000
107 New Member
@parag1234567
hi
you can put per element of form in a cell of table
an allocate id to per cell
then you should write a fuction
that show or hide per cell with display properties
document.all[id].style.display= "none" for hide cell this code for IE
or
document.layers[id].display="none" for hide cell this code for netscape
and with allocate "" to this property cell has shown
be successful
Jun 22 '09 #7
acoder
16,027 Recognized Expert Moderator MVP
There's no need for a table. Any container element (span/div/p, etc.) will do.

Your suggestion of document.all and document.layers is very old and unsupported in most modern browsers. Use the standard document.getEle mentById() to refer to elements.
Jun 22 '09 #8

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

Similar topics

13
40774
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div style="display:none"> can be displayed by setting the style attribute to "display:", or hidden with "display:none". This gives the illusion that the person filling out the form is switching from page to page...without the overhead of extra hits on the server,...
2
28577
by: Matt | last post by:
If I do the following, the browse text box still cannot see C:/hello world/test.txt. <input type="file" name="fileName" value="C:/hello world/test.txt" size=80> Any ideas? and workarounds to this problem? thanks!!
2
14137
by: Liming | last post by:
hello, I have the follwoing code <div id="detailtable" style="visibility:hidden"> <table id="detailtablehidden" width="100%" border="0"> .... </table> </div>
32
3885
by: fran7 | last post by:
Hi, Trying to solve a problem with no knowledge of asp. I have a dropdown list populated from my database with card decription. The output is names like, abstract,illustration etc. I am sending the results to another page like so .. html directory.asp?PostCardID=XX .. Now the request.querystring I presume should be something like this. ..asp
1
6458
by: msg2ajay | last post by:
hi, i am working on <div> i have to hide some part of the table. I am not able to hide that table part can anybady tell me where is the error. <html> <head> <script type="text/javascript"> function callme(){ document.getElementById("hid").style.visibility="visible"; }
0
9564
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10295
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9125
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7604
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5500
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.