Web Analytics Made Easy -
StatCounter no image load - CodingForum

Announcement

Collapse
No announcement yet.

no image load

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • no image load

    Is there some way to load one image if another doesn't load instead of having the generic browser image placeholder? I saw some javascript that looked promising but didn't work. Does anyone know if this can be done?

  • #2
    Do you mean something like this?:

    <img name="myImage" SRC="first.gif" lowsrc="second.gif">

    Not 100% sure this is what you are looking for, but figured it was worth mentioning .

    EDIT: We posted @ almost the same time Dave . Well...at least there are a couple of options now . (Not sure mine is too valid though, I've never had occasion to use lowsrc).
    Last edited by boxer_1; Jun 30, 2002, 06:21 PM.
    boxer_1
    CodingForum Moderator
    "How did a fool and his money get together in the first place?"

    Comment


    • #3
      lowsrc

      Thanks for the replies. I'm going to try both options out. I have never seen the "lowsrc" tag before. How exactly is it used and what does it do? I tried it out but the lowsrc never loads regardless of whether there is a first image.

      Comment


      • #4
        Re: lowsrc

        Originally posted by blake74
        Thanks for the replies. I'm going to try both options out. I have never seen the "lowsrc" tag before. How exactly is it used and what does it do? I tried it out but the lowsrc never loads regardless of whether there is a first image.
        I would take Dave's suggestion. I mis-remembered (I know, not a word) what the lowsrc attribute was used for. How ever it was once used to breech hotmail's security:

        http://www.info-sec.com/internet/00/...10600a_j.shtml

        Not of much relevance to your question.
        boxer_1
        CodingForum Moderator
        "How did a fool and his money get together in the first place?"

        Comment


        • #5
          onError

          The onError code works great with basic html page! However, if I try to use it as output from a cgi script it causes an error in the script and so the script then doesn't work. I'm guessing it might be with the semicolon ( character, maybe not. Does anyone know how to fix this or make it compatable?

          Comment


          • #6
            try escaping the semi-colon?
            bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

            i am a loser geek, crazy with an evil streak,
            yes i do believe there is a violent thing inside of me.

            Comment


            • #7
              being fairly new to scripting, what is 'escaping'?

              Comment


              • #8
                it worked. thought i tried that but guess not. thanks dave.

                Comment


                • #9
                  Anyone know how I can get this idea to work right?:

                  <img src="pics/test.jp2"
                  border="0"
                  onError="document.write('No JPG2000');">

                  Seems to work, but makes IE continue to do something and takes 2 steps back to get out of the page it's on...
                  Quيet Storm Designs ~ Art is not what you see, but what you make others see.
                  · the Storms· || ·Ultraviolent Winter· || ·Was Einstein Wrong?· || ·It´s About Time!·

                  Comment


                  • #10
                    <html>
                    <head>
                    <title>untitled</title>
                    </head>
                    <body>
                    <img src="pics/test.jp2" border="0"
                    onerror="this.src='http://www.codingforum.net/images/smilies/mad.gif';
                    document.getElementById('message').innerHTML='No JPG2000'">
                    <span id="message" style="font:bold 12px arial;color:red;"></span>
                    </body>
                    </html>

                    Comment


                    • #11
                      And there it is!

                      Works perfect! Grasias!
                      Quيet Storm Designs ~ Art is not what you see, but what you make others see.
                      · the Storms· || ·Ultraviolent Winter· || ·Was Einstein Wrong?· || ·It´s About Time!·

                      Comment


                      • #12
                        image error

                        I got this code that load pic2.jpg if first one doesn't exists, BUT it doesn't work on the MAC at all.

                        How to force Mac to recognize onError="this.src='Pic2.jpg'" code?

                        <img src="Pic1.jpg" onError="this.src='Pic2.jpg'">

                        Comment


                        • #13
                          This may be far fetched, but I am no javascript wizard. Just as the onError works with images, is there something that can be set up so that if a specific text word shows up it will be omitted from showing? Such as if the word 'included' keeps showing up from a cgi output. If I don't want users to see this, can it be omitted from showing or even have the text color automatically change to the color of the page background so it blends in?

                          Comment


                          • #14
                            Hi.....I have written a script for the same.
                            Its at http://www.geocities.com/e_i_search/...ror-finder.htm
                            Scripting | JavaScripts | PerlScripts | Python Scripts | Articles | My Journal

                            Comment


                            • #15
                              Hello premshree..I have a cgi script that is outputting the word "included" from a text file. I don't want the "included" word to show. Is there any way that you know of that will check to see if the word ouputted is "included" and if so no show it or even change the color of it so it'll blend into the background? Like something in the <font> tag or something?

                              Comment

                              Working...
                              X