Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Junior Member eli2k's Avatar
    Join Date
    Jun 2003
    Posts
    9
    Member #
    1888
    I'm trying to place the onLoad tag you usually place in the <BODY> tag inside an external .css file. Here is what that section looks like:

    BODY {onLoad="MM_preloadImages('images/tncsmokebg.gif','images/smoke_pink.gif'";}

    Is the coding all right? It doesn't seem to be preloading these two files. I set it so when I hover over a link, this graphic becomes the background of the link.

  2.  

  3. #2
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    I don't believe you can because you're throwing in some Javascript now...
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  4. #3
    Member a-drive's Avatar
    Join Date
    Mar 2003
    Posts
    94
    Member #
    809
    You can't.

    Put it into an external .js file instead.

  5. #4
    Member a-drive's Avatar
    Join Date
    Mar 2003
    Posts
    94
    Member #
    809
    Well actually, you wouldn't be able to put the specific code you used above into a .js file. But you can find many examples of image preloading on the web.

  6. #5
    Junior Member eli2k's Avatar
    Join Date
    Jun 2003
    Posts
    9
    Member #
    1888
    I see. Thanks. I'll try looking for some - are they based on JavaScript, PHP, or something else?

  7. #6
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    I think this should work. Only thing I'm not sure about is the document.captureEvents('LOAD') part. I don't remember what netscape flags the load event as, and google isn't working for me, so I can't research it.

    if (document.layers) document.captureEvents('LOAD');
    document.onload = MM_preloadImages('images/tncsmokebg.gif','images/smoke_pink.gif'");

  8. #7
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    Whatever it is, it isn't valid CSS (as it's usually something like color : blue I'm fairly certain you can't do that...
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  9. #8
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    oops...

    I meant to say to include that script as a js file... lol

    maybe I should have been more explicit


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:45 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com