473,396 Members | 2,013 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,396 software developers and data experts.

Using <div> to cover page contents

74
I'm using Ajax to help make my webpage appear to be smoother.

When a control has submitted, I would like to prevent any controls within that control from resubmitting until the request has completed.

Because my forum has many buttons on it, it would take a long time to disable each one upon submitting the forum (using JavaScript).

So instead, I plan on using a <div> that will "shield" my buttons and prevent the user from clicking any button under that <div>.

My problem is that I can't seem to get this <div> to display over the content.

Eg (simplified example)
Expand|Select|Wrap|Line Numbers
  1. <div id="theContainerOfMyControls">
  2.     <div id="theButtonShieldingDiv" style="background-color:black; position:absolute; height:100%; width:100%; display:none;"></div>
  3.    <!-- a bunch of other <div>s containing buttons are here that I need to "cover up" -->
  4. </div>
  5.  
So, basically I set the display of the "theButtonShieldingDiv" from "none" to "block" when the page is submitted to the server.

This will cover the entire contents of the screen that's being displayed; however, when the user scrolls down, the section previously hidden is not covered by the <div>...making it still possible for the user to submit the page more than once.

Is there a way to make the "theButtonShieldingDiv" span the contents of "theContainerOfMyControl" instead of the whole page?

(Basically I'd like to use "position:relative" but I'm not having luck with this)

If this isn't possible, is there a way to make sure that the <div> is 100% of the content instead of 100% of the page content being displayed?

Any suggestions are welcome!

Thanks a lot
-LilOlMe
Feb 11 '08 #1
3 4610
drhowarddrfine
7,435 Expert 4TB
I have to think about this (as I'm walking out the door) but I just closed a thread a few minutes ago that I think is related. Check that one out. "How to place a div on top of another div"
Feb 11 '08 #2
lilOlMe
74
I have to think about this (as I'm walking out the door) but I just closed a thread a few minutes ago that I think is related. Check that one out. "How to place a div on top of another div"
I saw the thread that you just closed.
It still doesn't help me.

I learned that the "position:absolute" does work relative to it's parent container but only if you don't set the top, bottom, left, or right css attributes.

I'm still experiencing a problem with the "covering" <div> not becoming height:100% of the containing <div>...it only goes to the bottom of the browser and when you scroll down the rest of the page is still visible.

Thanks for your help,

-LilOlMe
Feb 11 '08 #3
Death Slaught
1,137 1GB
Try giving your division a z-index of 100.

Hope it helps, Thanks,
{\_/}
(' . ')
(")[DEATH](")
(")(")
Feb 11 '08 #4

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

Similar topics

3
by: Craig | last post by:
Hi, What I'm trying (quite poorly) to do is make it so when a link is clicked the text inside a div or p changes. I've tried numerous things, most of which work in IE but none of which work in...
8
by: Daniel Hansen | last post by:
I know this must seem totally basic and stupid, but I cannot find any reference that describes how to control the spacing between <p>...</p> and <div>...</div> blocks. When I implement these on a...
61
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
2
by: Brian Idzik | last post by:
I've successfully setup a xhtml 1.0 strict page with Mozilla & Netscape to display links in a toolbar into an internal <div id='content'> within the same document. The toolbar uses some...
3
by: Philip | last post by:
I am trying to make a bunched of left-floated divs that will be contained in a larger div. the floated divs all contain a left-floated img and text of varying sizes. If I don't set a height (or...
2
by: listaction | last post by:
Hi Folks, can you help me by explaining how the code below can be translated using <div> and achieve the same effect? Thanks, LA <html> <body> <table bgcolor="#000000" width="100%"...
4
by: He Shiming | last post by:
Hi, I'm wondering how can I use <DIV> to mimic a <TABLE>. In a bare <TABLE> without a width attribute, the width of the table get dynamically expanded according to the content. However, <DIV>...
19
by: Kim André Akerø | last post by:
For some reason, I can't get the middle column of this setup to work properly in IE (go figure). It looks like it's supposed to in Opera and Firefox, but now I only need it to work in IE as well. ...
1
by: menmysql | last post by:
hi to all i want to place a division(using <div> tag) at a perticular location(x,y). is it possible. if possible please tell me how to do it. regards
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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...
0
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,...

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.