SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist priti's Avatar
    Join Date
    Aug 2006
    Location
    India
    Posts
    488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    something like lightbox.js

    Hi,

    I wanted to learn from some javascript gurus that how to cover the screen with a transparent layer while my form is getting saved.I have a lsight idea that it will be implemented with ajax.But not sure how to give css effect for activating/deactivating screen.

    something like lightbox.js do !! hope i am able to deliver the idea

    any pointer or guidance would be gr8ly appreciated.

    Thanks & Regards,
    Priti

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Ask yourself first whether this is really necessary. Ask yourself whether it's likely to annoy your visitors. Maybe they'll want to look over the contents of the form while it's being saved. If you're using Ajax, you might as well use the readyState information to display a simple "Saving..." next to the button that was clicked, or in fact make the value of the button that was clicked change to "Saving...".

    If you still insist on that, I recommend simply having a look at the source and finding out how it's done. It's basically a div with some CSS applied (easily found in the CSS source). The div is placed with position:fixed for browsers other than IE6, including IE7. For IE6 it is placed absolutely at the top left of the viewport and it is given a width of 100% and a height equal to the height of the body. Javascript will be necessary for the height (I think), via document.documentElement.scrollHeight if the body is higher than the viewport or via document.documentElement.clientHeight if it is shorter.

  3. #3
    SitePoint Evangelist priti's Avatar
    Join Date
    Aug 2006
    Location
    India
    Posts
    488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Raffles View Post
    Ask yourself first whether this is really necessary. Ask yourself whether it's likely to annoy your visitors. Maybe they'll want to look over the contents of the form while it's being saved. If you're using Ajax, you might as well use the readyState information to display a simple "Saving..." next to the button that was clicked, or in fact make the value of the button that was clicked change to "Saving...".

    If you still insist on that, I recommend simply having a look at the source and finding out how it's done. It's basically a div with some CSS applied (easily found in the CSS source). The div is placed with position:fixed for browsers other than IE6, including IE7. For IE6 it is placed absolutely at the top left of the viewport and it is given a width of 100% and a height equal to the height of the body. Javascript will be necessary for the height (I think), via document.documentElement.scrollHeight if the body is higher than the viewport or via document.documentElement.clientHeight if it is shorter.
    Thanks Raffle

    Well i was able to find this by my own actually i have a form in which i give option to user to upload file and then save the form hence my client needed it. :-)
    Anywaz thanks for your guidance and yet i have to furnish and will ask if i got stuck with something to you

    Regards


Bookmarks

Posting Permissions

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