Page 4 of 4 FirstFirst ... 234
Results 31 to 36 of 36

Thread: Anyway to know if an image did NOT display in the browser?

  1. #31
    Join Date
    Jan 2009
    Posts
    82
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    None of that is happening here, I just upgraded to FF 3.0.7.
    Hmm. Its still happening on my end. Would you mind putting your code up live and let me test it on my browsers like before.
    Here are the bugs I found.

    Clicking CANCEL breaks the button in IE.

    and in all browsers the code that verifies the image always runs no matter.

    I'm going to put up a live page with the code and see what you get on your end.

  2. #32
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,373
    Thanks
    77
    Thanked 3,421 Times in 3,382 Posts
    Blog Entries
    12

  3. #33
    Join Date
    Jan 2009
    Posts
    82
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Its weird now firefox seems to re-enable the button. The issue comes and goes. People probably think I'm nuts

    But it's still always checking the URL and saying BAD IMAGE even when you click OK anyway on your page.

    and here it is on my end. What are you getting here?
    http://monaya.bravehost.com/javascri...checkimage.htm
    Last edited by monaya; 03-05-2009 at 07:03 PM.

  4. #34
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,373
    Thanks
    77
    Thanked 3,421 Times in 3,382 Posts
    Blog Entries
    12

    Default

    I'm just not getting those results here. Do you mean that if an image checks out as bad, then you upload an image to the 'bad' location and run again that even though the image is now good, it's still bad? If that's what you are talking about, we will need to 'bust the cache' on previously bad images. But I don't want to bother writing the code for that unless that's the problem. If that isn't the problem, what exactly do I have to do - step by step - and in what browser - to get mine to show this problem.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #35
    Join Date
    Jan 2009
    Posts
    82
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    I'm just not getting those results here.
    In the original code you said that if a user attempts to enter a Live image URL that is not real twice, they get to submit the form anyway by hitting OK but thats not happening?

    This is in Firefox 3.0.7
    I tried hitting Validate once entering nothing I get this:
    http://screencast.com/t/6utHh7AYLFp

    I tried again to try a second submission entering nothing again I get this:
    http://screencast.com/t/raOcWjdxq

    When you hit ok you get this again:
    http://screencast.com/t/ng5Wydig

    Then what's the point of giving the user a choice if it's still going to disallow a bad live url anyhow.

    Same thing happens In Safari 3.2.1 but also the button just becomes forever disabled if nothing is entered.


    Just little quirks I guess.

  6. #36
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,373
    Thanks
    77
    Thanked 3,421 Times in 3,382 Posts
    Blog Entries
    12

    Default

    Well technically no, not quirks. But yes something quirky. Um, the behavior in FireFox is correct. What do you expect to happen? I mean, if you continue to enter a bad image, it isn't suddenly going to become good. However, if circumstances were to change and a URL that previously pointed to a bad or missing image now points to a valid image, then it would go through. I'm not sure why there is a problem in Safari with the validate button not returning to a clickable state. The easiest thing for that would be to add a reset button to the form:

    Code:
    <input type="reset" value="Reset" onclick="this.form.elements.sub.disabled=false;return true;">
    However, Safari may just need to have a timeout used to enable it to make the validate button clickable again, in other words - things may just be happening too fast for Safari.

    Now, forget about Safari for a moment, if there is something else you would want it to do on the second attempt of a bad image, that could probably be arranged, but I would need to know specifically what that might be.

    Added Later:

    I figured out the problem in Safari. If the image object source (form.elements.imageURL.value) is blank neither the onload nor the onerror functions fire. I 'fixed' that by forcing the onerror function to fire in that case. Be sure to refresh the page before trying a blank submission again in Safari. Of course, other behavior could be substituted. Perhaps the best thing in that case would be to not submit and to re-enable the validate button. It's really just a judgement call.
    Last edited by jscheuer1; 03-09-2009 at 02:34 PM. Reason: fix typo - later add info on Safari
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Tags for this Thread

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
  •