Wow... this post is pretty unreadable. Ok, i'll try to make it
simpler:
I've got this first page:
-----------------------------------------------------------
<div id=1>some text here</div>
<div id=2 style="display: none;"some text here</div>
<div id=3another text here </div>
<div id=4 style="display: none;">text here:
<div id=4.1>one comment </div>
<div id=4.2>another comment </div>
</div>
<div id=5 style="display: none"some text </div>
-----------------------------------------------------------
divs 1 and 3 are visible
divs 2, 4 and 5 are hidden (and 4.1, 4.2 too as they're 4's children).
This page is the reference in terms of visibility of divs.
Now, let's say I have another page, like this one:
-----------------------------------------------------------
<div id=1>some text here</div>
<div id=2some text here</div>
<div id=3another text here </div>
<div id=4>text here:
<div id=4.1>one comment </div>
<div id=4.2>another comment </div>
<div id=4.3>yet another comment </div>
</div>
<div id=5some text </div>
<div id=6a new div here with some text!!! </div>
-----------------------------------------------------------
This page is somehow the same but not really because:
- All divs are visible
- the div 4.3 have been added
- the div 6 is new too
OK?
Now the question is:
For this second page, considering my reference page, how could I
programmatically:
-let divs 1 and 3 visible
-hide divs 2, 4, 5 ( and all children divs of 4)
-hide div 6 too.
Thanks for all kind of suggestions.
Num, 1 1894
Num GG wrote:
Wow... this post is pretty unreadable. Ok, i'll try to make it
simpler:
I've got this first page:
-----------------------------------------------------------
<div id=1>some text here</div>
<div id=2 style="display: none;"some text here</div>
<div id=3another text here </div>
<div id=4 style="display: none;">text here:
<div id=4.1>one comment </div>
<div id=4.2>another comment </div>
</div>
<div id=5 style="display: none"some text </div>
-----------------------------------------------------------
divs 1 and 3 are visible
divs 2, 4 and 5 are hidden (and 4.1, 4.2 too as they're 4's children).
This page is the reference in terms of visibility of divs.
Now, let's say I have another page, like this one:
-----------------------------------------------------------
<div id=1>some text here</div>
<div id=2some text here</div>
<div id=3another text here </div>
<div id=4>text here:
<div id=4.1>one comment </div>
<div id=4.2>another comment </div>
<div id=4.3>yet another comment </div>
</div>
<div id=5some text </div>
<div id=6a new div here with some text!!! </div>
-----------------------------------------------------------
This page is somehow the same but not really because:
- All divs are visible
- the div 4.3 have been added
- the div 6 is new too
OK?
Now the question is:
For this second page, considering my reference page, how could I
programmatically:
-let divs 1 and 3 visible
-hide divs 2, 4, 5 ( and all children divs of 4)
-hide div 6 too.
Thanks for all kind of suggestions.
Num,
1/. Give all divs an id="something" statement so you can
'programmatically' FIND them .
2/. Write a program that on some event, finds them and sets their
style.display property between 'inline' and 'none'.
3/. If you want stuff to overlay stuff, look at the Z-index style attribute.
4/. if its just a question of switching a page put it in one div
container and switch that. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Ron Bott |
last post by:
I have a fixed size <div> I would like to display in the center of a
browser window. To get the horizontal alignment is no problem using
'margin-left: auto' and 'margin-right: auto' but I cannot...
|
by: Charlie T |
last post by:
Hello,
is there any way to get this to work?
myID.innerHTML = "Hello"
<DIV id="myID"></DIV>
<DIV id="myID"></DIV>
|
by: tungchau81 |
last post by:
Hi,
A Modal Dialog does not allow us to highlight the text content inside
<DIV> tag unless I use a <textarea> tag to display that text content.
However, the situation of my software makes it...
|
by: hibernate |
last post by:
I'm somewhat new to javascript/DHTML, and this problem has been
plaguing me. I have made an 'array' of <div> tags within my html
document like so:
<div id="menu"> menu1 </div>
<div id="menu">...
|
by: adriann |
last post by:
Hi,
I'm using PHP to echo or stream out some DIV tags with content inside, by a user selection, and after a page has initially loaded.
My question is, Can I erase this dynamically created DIV...
|
by: tawxic |
last post by:
My code is thus:
<div id="navigation">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About Phazm</a></li>
<li><a href="#">Services Offered</a></li>
<li><a href="#">Request...
|
by: howa |
last post by:
hi all, consider the example below:
//////////////////////
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html...
|
by: uranuskid |
last post by:
Hey guys,
I control my webappearance ewith a series of <div> elements. They are supposed to be in line and the main container is supposed to stay min 880px in wdth. However, the left infobox has...
|
by: Martin Plotz |
last post by:
Hi all,
is it possible to say "I'd like a <divwith width:100% and an aspect
ratio of height/width=2/3" in a way that browsers understand?
Thanks for hints,
Martin
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
| |