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 6 of 6
  1. #1
    New Coder
    Join Date
    Jan 2004
    Location
    Northeastern PA
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can't see images til rolled over?

    I have a PHP page with an HTML header copied into it. The header is set to use an external javascript file for the rollover images.

    ?? Images are not displaying until they are rolled over. They appear as "x"'s then once rolled over, they appear - on every page this happens!

    I've only tested it in IE 5.2 for Mac. Does anyone know what causes this?

    Images are not broken, just are not displaying right away.

    Should I be using a preload script in the header? I don't know how to do this yet.

    Any recommendations would be greatly appreciated!

  • #2
    New Coder
    Join Date
    Jul 2002
    Location
    Los Angeles
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You should post your code. I would suspect that your original image source is incorrect. On your roll over action such as "OnMouseOver", you have the image.src change to your roll over image and "OnMouseOut", you set it to the correct image.

  • #3
    New Coder
    Join Date
    Jan 2004
    Location
    Northeastern PA
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Let me re-phrase this...

    Thanks for your response Oakendin ~

    *UPDATED: Here is the link to the page.

    [*Code Removed because of a recent hack to this site.*]

    I know the external javascript file is not the problem because I am using it for other parts of the site.

    The normal states of the images are there, but can only be seen AFTER rolling over them. Then they are there, and will stay there. The rollover states are working correctly too. Just can't figure out why I can't see the images immediately after the page loads. I AM waiting for the page to load completely, (on cable, not long at all - except in Safari, which is separate problem).

    When I use the same header in a .shtml file, I don't have this problem. It's only in the .cgi file (which is PHP coded).
    Last edited by Vermillien; 01-12-2004 at 04:19 PM.

  • #4
    New Coder
    Join Date
    Jan 2004
    Location
    Northeastern PA
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Figured out the problem...

    When I moved the directory out into the root, the images were loading correctly! Before, they were having trouble. But since the files are still in different directories themselves (for instance, the script is within a directory, and the images in another) I still had to call the images using the full http path from the script.

  • #5
    New Coder
    Join Date
    Jul 2002
    Location
    Los Angeles
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If I don't have any subsites, I usually call from the root:

    Code:
    <img src="/images/image.gif">
    the "/" takes you to the root of your site so where ever you move your file in your directories, its still goes to the right folder.

  • #6
    New Coder
    Join Date
    Jan 2004
    Location
    Northeastern PA
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks

    I'll give that a try... thanks

    (now I feel dumb)

    Sorry I had to remove the code, but the site was defaced last week and I don't know much about security, so haven't figured out what is safe and what is not, to post to a forum......


  •  

    Posting Permissions

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