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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

disable the page while popup is active

Status
Not open for further replies.

manishblr1

Programmer
Dec 20, 2010
20
US
Hi ,

I have been able to almost finish the project but except this.
How to disable the page when there is pop up called .

and enable when pop up is closed.


Thanks in advance.
 
Hi

What you describe is a modal window.

As far as I know, Explorer-only implementation exists, but no chance to work in other browsers. But modal windows are user unfriendly, so in newer Opera versions not even the [tt]alert()[/tt], [tt]confirm()[/tt] and [tt]prompt()[/tt] dialogs are modal windows anymore.

Better search for a lightbox implementation able to display external documents, for example GreyBox.


Feherke.
 
If you are using alerts or confirms or prompts etc.. you could manually add a div with a semi transparent background absolutely positioned over the entire website before calling the alert, and then removing it after.

Code:
document.getElementById('coverdiv').style.display='block';
alert(...);
document.getElementById('coverdiv').style.display='none';

If you are using something else only you know how you are calling your popup, and only you can implement it within your code.

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top