Re: alternative img

Discussion in 'HTML' started by Richard, Jun 25, 2003.

  1. Richard

    Richard Guest

    "Headless" <> wrote in message
    news:...
    > "Richard" <anom@anom> wrote:
    >
    > >> I make a dynamicaly creatated image tag and i'm not sure the image is
    > >> going to exist at the time someone views my homepage. Is there a way to
    > >> tell the browser it should show another (default) image if the first

    one
    > >> isn't available?

    > >
    > >No expert here, but you might try using an if statement.
    > >if first.jpg exists show it else show second.jpg.

    >
    > HTML is a markup language, not a scripting or programming language, no
    > if, then, else statements in HTML.
    >
    > Using scripting for this would be a big no-no, as it would prevent
    > content from being accessible.
    >


    OP wanted a solution to the problem and I offered one.
    Nothing was said about needing to be strictly in html.
     
    Richard, Jun 25, 2003
    #1
    1. Advertising

  2. > > Using scripting for this would be a big no-no, as it would prevent
    > > content from being accessible.
    > >

    >
    > OP wanted a solution to the problem and I offered one.
    > Nothing was said about needing to be strictly in html.


    Your kind of answer was fine but I still have the problem described in my
    previous post:

    > I'm using php. Testing wether the file exists doesn't seem to work
    > because the target directory is not readable. It is possible to just
    > open the file and then test wether it succeeded but in the meantime the
    > server already printed an error message and I don't know how to avoid
    > that.



    David
     
    David de Kloet, Jun 25, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. news.austin.rr.com

    how to download img from html img tag

    news.austin.rr.com, Apr 27, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    525
    Steve C. Orr [MVP, MCSD]
    Apr 27, 2005
  2. Clubberboy

    Re: alternative img

    Clubberboy, Jun 25, 2003, in forum: HTML
    Replies:
    0
    Views:
    896
    Clubberboy
    Jun 25, 2003
  3. Philipp Lenssen

    Problem: <img></img>

    Philipp Lenssen, Jun 27, 2005, in forum: XML
    Replies:
    15
    Views:
    783
    David Håsäther
    Jul 3, 2005
  4. Jopek
    Replies:
    7
    Views:
    415
    dorayme
    Apr 26, 2009
  5. Replies:
    7
    Views:
    197
    Tad McClellan
    Jun 22, 2006
Loading...

Share This Page