SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member georgecrawford's Avatar
    Join Date
    Aug 2003
    Location
    london
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    change style sheet question

    Hi guys,

    Wondering what people think of this idea. I want to start my index page with a flash splash-screen, with the rest of the page automatically loading after the animation finishes.

    Easy, sure (the GetURL command), but I want to try and avoid the screen flicker you get when the new page loads.

    I thought to myself what if the whole page had already loaded? Load the whole page, with everything except the flash movie hidden using a style sheet. Then get the movie to trigger a JavaScript function on its completion, which changes the style shet.

    My effort is here:

    http://www.therealeubo.org.uk/test

    The JavaScript function is called with the line

    Code:
    getURL("javascript:change_style('style2')");
    in the flash file.


    Wondering what your thoughts are: is this going to cause problems with compatibility, or should I be safe? I've tested on as many browsers as I have, and it works great, but I would love some input if you have any old browsers!

    Is there another condition I could put in the JavaScript, other than if (document.all) and if (document.getElementById), in order to cater for more browser types?

    Also, is there a better way of doing what I'm aiming for? I want to produce the most sensible, reliable and thought-out final result that I can!

    Thanks for your help.

  2. #2
    SitePoint Member georgecrawford's Avatar
    Join Date
    Aug 2003
    Location
    london
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just tested in Opera 6 for Mac - the style sheet change doesn't happen. What kind of JavaScript do I need for Opera's DOM as regards style sheets?


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
  •