#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2006
    Posts
    168
    Rep Power
    22

    How to check images on if statement?


    Hi guys,

    I need your help, I want to create a filename for the image on the webpage and I also want to out how I can check on the if statement to see if the image on the webpage is exist.

    Code:
    $image1 = <div id="image1" style="position:absolute; overflow:hidden; left:415px; top:157px; width:114px; height:81px; z-index:0"><img src="/images/tvguide_blue.jpg" alt="" title="" border=0 width=114 height=81></div>

    On the webpage, it display as "$image =". Does anyone know how i can create a function for a filename so I can write something like this:

    Code:
    if ($image = exist) { 
      // do something
    }
    Does anyone have any idea?

    thanks in advance
    Last edited by stephen100; March 7th, 2013 at 06:47 PM.
  2. #2
  3. Java Junkie
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Feb 2004
    Location
    Mobile, Alabama
    Posts
    4,022
    Rep Power
    1285
    You need to ask this in the JavaScript forum.

IMN logo majestic logo threadwatch logo seochat tools logo