473,323 Members | 1,560 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,323 software developers and data experts.

making your page invisible then visible

Hi,

I have span tag around my form-- which is basically
my entire page-- that sets the display to none. I want
to, after running through some javascript care of the body
onload event, make the entire page visible again. How
do I do that?

Jul 20 '05 #1
2 10290
Stuart Wexler wrote:
I have span tag around my form--
That's invalid, inline elements (span) can not contain block level elements
(form). You probably want a div instead... or apply the JS/CSS to the form
directly.
which is basically my entire page-- that sets the display to none. I
want to, after running through some javascript care of the body
onload event, make the entire page visible again. How
do I do that?


document.getElementById('foo').style.display = 'block';

.... and anyone in a browser which supports CSS but not JS is *&^$%^$ed.

--
David Dorward http://david.us-lot.org/
Jul 20 '05 #2
Stuart Wexler wrote:
Hi,

I have span tag around my form-- which is basically
my entire page-- that sets the display to none. I want
to, after running through some javascript care of the body
onload event, make the entire page visible again. How
do I do that?


<body onload="makeVisible();">
<span id="mySpan" style="position:relative;visibility:hidden;"><!-- HTML
content --></span>
<script type="text/javascript">
function makeVisible() {
var element;
if (document.getElementById) {
// IE 5.5+, NS6+, Opera 6+
element = document.getElementById('mySpan').style;
} else if (document.layers) {
// NS4
element = document.layers['mySpan'];
} else if (document.all) {
// IE < 5.5, Opera 5(?)
element = document.all('mySpan').style;
}

if (element) {
element.visibility = 'visible';
} else {
alert("I hope you're reading this, because if you have
JavaScript off, you will see nothing");
}
}

--
| Grant Wagner <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 6/7 and Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dakkar | last post by:
I made a program like i showed below and i used this.Visible = false; line to make it invisible but it doesnt work where did i make mistake ? here is my code
5
by: Joe Reazor | last post by:
I've got an asp.net page that has approximately 1,440 controls on it. You must think I'm crazy, but we need to have the page organized in this fashion. As you can imagine, the page takes a very...
11
by: Frank Esser | last post by:
Hi, I created an ASP.NET page (test.aspx) with some web controls in GridLayout (Design time). When I look at the collection page.controls by foreach (Control ctrl in Page.Controls) { ....
1
by: SP | last post by:
Hello there, I have a DataList create as below. <asp:DataList ID="dl_Immunpsuppressive_Main" Runat="server" Width="100%"> <ItemTemplate> <table id="Immunpsuppressive_Main" width="100%"...
69
by: kabradley | last post by:
Alrighty Guys and Gals, I have another question that I hope you all can help me with. I have a report that uses a cross-tab query as its record source. This cross-tab query is getting all of its...
1
by: Sunfire | last post by:
I need to know how to position a layout table in code next to (to the right of) another table on the page? I also then need to know how to make it invisible in code. How would you do this?
1
by: ArunDhaJ | last post by:
Hi, I'm in need of help for solving the following problem: I've a page with two div tag as follows: <div id="divNormalView" runat="server"> <asp:listbox id="listSelectedMembers"...
5
by: Andy B | last post by:
I have 2 TextBoxes and an Add button on a page. When the user fills in the TextBoxes, the values are added to a dataset table. When the page gets done reloading, the TextBoxes are turned into...
0
by: AAaron123 | last post by:
Is there a method of making a sitemapnode not visible and still have it's title appear in the bread crumbs? The reason for the invisible sitemapnode is so the page appears in the breadcrumbs (even...
0
isladogs
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...
1
isladogs
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...
0
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...
0
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
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....
0
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
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.