SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Jul 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy how to check if the picture already output IN Javascript?

    Hi everyone,

    Let say, i have a page that output this a several image, how to check weather a certain image already successfully load to user browser?

    example image:

    <div><img src='http://www.nasa.gov/images/content/84857main_EC04-0325-23_lg.jpg' width='336' height='280'></div>

    i need to return a value if the picture finish load.

    Thanks.

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Look for the image in document.images.

  3. #3
    SitePoint Member
    Join Date
    Jul 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy how?

    Let say i have SWF file?

    can i check too?

  4. #4
    SitePoint Member
    Join Date
    Jul 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry i read ur link.

    But it say document.images is part of DOM HTML, and it only works for HTML documents. As you see i'm doing it in php code.

  5. #5
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    HTML Code:
    <div><img src='http://www.nasa.gov/images/content/84857main_EC04-0325-23_lg.jpg' width='336' height='280'></div>
    That looks like HTML. I know the picture is being generated by PHP, that doesn't matter. To the browser it's just an image.


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
  •