Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable part of a page

Status
Not open for further replies.

ChrisRChamberlain

Programmer
Mar 23, 2000
3,392
GB
Hi all

Is it possible to make an area of a page, say 0 to 300px north to south, 100% width, readonly?

Thus if you have menu, links etc in that area they become inactive, leaving the balance of the page active.

TIA



FAQ184-2483 - answering getting answered.​
Chris [pc2]
PDFcommandertm.com
PDFcommandertm.co.uk


 

I would say that your best bet would be to have a transparent iframe covering the area, with a transparent 1x1 pixel GIF filling it to stop any underlying elements being clicked.

I've not tried it to cover anything on the page (more specifically, form elements), but I've done something similar to the "greyed out" screen you see when shutting down Windows (95 - 2000) using a DIV and image in much the same way.

Hope this helps,
Dan
 
BillyRayPreachersSon

Thanks for the suggestion - unfortunately the menu appeared over the top of mask.gif positioned at top="0" and left="0", which somewhat defeated the object of the exercise!

Menu definitions are in a .js file so changing the .js file called, disabling other links etc etc seemed to be the only route.

FAQ184-2483 - answering getting answered.​
Chris [pc2]
PDFcommandertm.com
PDFcommandertm.co.uk


 

Did you put the mask image in an iframe?

Either way, the iframe needs to have a big z-index value, so try setting one if you haven't already (100 should be fine).

The iframe is necessary to overlay form elements - if you aren't goinbg to have any form elements, then you should be fine with just the image, and no iframe. The image / iframe MUST be higher in the DOM than any element that you wish it to overwrite, so the best bet is to make them a direct child of the body.

Hope this helps,
Dan
 
BillyRayPreachersSon

Unfortunately I have made the changes and I did not pick up on the z-index as being the means of keeping the menu under the IFRAME.

Thanks for your help.

FAQ184-2483 - answering getting answered.​
Chris [pc2]
PDFcommandertm.com
PDFcommandertm.co.uk


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top