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 3 of 3
  1. #1
    Regular Coder MrBiggZ's Avatar
    Join Date
    Apr 2005
    Location
    Indianapolis IN
    Posts
    259
    Thanks
    37
    Thanked 0 Times in 0 Posts

    How do you not show page contents while script is executing?

    Greetings!

    Since the birth of CSS3 you can easily use fonts that are NOT on the local users PC. This is the best! Although some fonts do not render through the browser. I wrote this script (for personal use) which is pretty elementary which reads fonts in a directory (without installing them in windows) and then lets you display them in various web aspects.

    In the script I pick a random background color and calculate a contrast color and then determine if the text color should be black or white depending on the color of the background.

    What's happening is that if I pile a bunch of fonts in the fonts directory when the script executes it displays the contents until it 100% complete. Basically I'd like it NOT to do that. I was looking around a progress bars but .. they don't seem to do much. I couldn't find one that would either give you that twrilling circle while it loads or something to that nature.

    **Is you test this script you MUST create a folder named 'fonts' in the root of where you put the script!

    ***If you find ways that I can make this more effecient or any tips or tricks that'd be great and constructive criticism is always appreciated!

    Thanks so much for any help or advice given!

    You'll need the javascript file animatedcollapse.js from my site http://handlersspot.net/css3font/animatedcollapse.js

    There's are three images:
    http://handlersspot.net/css3font/slantdivider.gif
    http://handlersspot.net/css3font/minus.png
    http://handlersspot.net/css3font/plus.png

    I tried to post the source here but it seems that I used up my allotment of 20K characters I tried to use the attachments feature but it doesn't work for me for some reason so I posted all the source here on my website: http://handlersspot.net/css3font/source.html

    Whew! That's allot of stuff!

    Again .. thanks for the effort/advice/help way in advance!

    Oh! Sorry! Meant to put the actual working version of this here --> http://handlersspot.net/css3font
    Last edited by MrBiggZ; 06-24-2010 at 06:21 PM. Reason: add working model

  • #2
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    Is this a javascript question?
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • #3
    Regular Coder MrBiggZ's Avatar
    Join Date
    Apr 2005
    Location
    Indianapolis IN
    Posts
    259
    Thanks
    37
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Rowsdower! View Post
    Is this a javascript question?
    Not really sure the scope of what javascript can do. Can it tell when the page is done building?


  •  

    Posting Permissions

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