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 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jan 2004
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How would I disable the entire screen?

    This is a good one ... hopefully I don't stump the guru's here.

    Background: I'm using a server side language (ColdFusion) to run some queries. I use a form to input all the variables that the query will use to run and submit that form to a second page that takes those variables and processes the queries and then shows the results.

    Current Solution: I'm currently disabeling the form buttons on page 1 onSubmit() and this works great, but it doesn't give the desired effect that something is actually happening. I work in an industry that really needs to hold the hand of the end user ... they are working joes with little to no computer savy.

    Desired Result: After submitting the form on page 1, I would like to use DHTML/Javascript (unsure how this would work) to "unhide" a layer/div that takes up the entire window and grey's it out while in the middle of the screen, in this same layer or a layer above it, display an animated graphic. The layer above the form would obscure the form and not allow form buttons/drop down menus to be changed.

    How would I go about doing this?

  • #2
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    How much of a delay are you expecting between the time the user submits the form and the page changes?
    If it's anything more than a few seconds, then it sounds as though you may need better (read: faster) hosting.

    If the problem is a long delay, then the best solution would be to resolve the delay rather than papering over it.

    …imho.

  • #3
    Regular Coder
    Join Date
    May 2005
    Location
    Michigan, USA
    Posts
    566
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool

    I do this all the time on one of my corporate sites. Some times there is a lot of processing going on. Especially with ASP pages and if you have any ASP Controls on it. It can be a mess. The correct solution is to remove all ASP controls but who has time to go back through and edit all that! Ok now onto the solution.

    Wrap every thing into divs...

    Code:
    <div id='myMeat'>
    ... All your form code...
    </div>
    <div id='mySaving' style='display:none'>
    ... what you want to display! ...
    </div>
    Now on submit you want to hot the first div by setting its display to none, and show the second div by setting its display to block. If you have any images in the mySaving div that you want to play you must reload them, after the submit action. Or else they will not move... hopefully this will help you in the right direction!

  • #4
    Regular Coder
    Join Date
    Jan 2004
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by SpirtOfGrandeur
    I do this all the time on one of my corporate sites. Some times there is a lot of processing going on. Especially with ASP pages and if you have any ASP Controls on it. It can be a mess. The correct solution is to remove all ASP controls but who has time to go back through and edit all that! Ok now onto the solution.

    Wrap every thing into divs...

    Code:
    <div id='myMeat'>
    ... All your form code...
    </div>
    <div id='mySaving' style='display:none'>
    ... what you want to display! ...
    </div>
    Now on submit you want to hot the first div by setting its display to none, and show the second div by setting its display to block. If you have any images in the mySaving div that you want to play you must reload them, after the submit action. Or else they will not move... hopefully this will help you in the right direction!
    Definitely the direction I want to go in ... in reference to the reply above yours by Bill Posters, I am running very complex queries on an old legacy database that can take upwards of 1 minute to run. This IS NOT a bandwidth issue with hosting ... it's a processing issue with an overly bloated stoneage database platform. We are in the process of migrating to SQL Server 2000/2005 (gotta love MSDN subscriptions).

    On to your reply ... how would I "reload" the images? Do you have any example code for the turning on/off the divs? Also, is this solutin cross-browser compatible?

  • #5
    Regular Coder
    Join Date
    May 2005
    Location
    Michigan, USA
    Posts
    566
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What do you mean by cross browser? Since you’re in a corporate environment a list of browsers would help. It might come down to you just having to set the visibility instead of the display, but the idea will work in all browsers. In order to refresh an image you just set its src to its self.

    Code:
    var oImg = document.getElementById(‘image’);
    oImg.src = oImg.src;


  •  

    Posting Permissions

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