Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Senior Coder
    Join Date
    May 2004
    Posts
    1,441
    Thanks
    15
    Thanked 0 Times in 0 Posts

    form opening popup and graying out page

    How can I make a form that on submit (method=post)
    it opens up a centered popup the height and width I want and then grays out the current page until the popup is closed?

  • #2
    Registered User
    Join Date
    Oct 2004
    Posts
    592
    Thanks
    0
    Thanked 1 Time in 1 Post
    Grayout effect is only for IE.

    On submitting -

    1 open popup window using window.open and Make the page gray using grayout() function provided below.

    Code:
    function grayout()
    {
    	ht = document.getElementsByTagName("html");
    	ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
    }
    2. on poup window, make an ungrayout and onunload functions below.

    Code:
    function ungrayout()
    {
    	ht = window.opener.document.getElementsByTagName("html");
           ht[0].style.filter = "";
    }
    onunload = ungrayout;


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •