Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 10, 2012 02:55 AM by vietvoquoc
May 05, 2012 02:47 PM|LINK
This is my problem and that is my idea. I think this is difficult thing to solve it.
My issue is We can or can't check 'image tag' is empty or wrong path. For instance,so i get image url from other website and when this image not exist (can removed) or i give wrong url ...
I mean if the img tag with src=empty or wrong path or image file is not exist .we can check it and replace them by nopicture photo (look like src="images/nopicture.jpg") . I really want to know we can or
can't do that.
I already read this Post and that is check src is empty ,right?
Hope helped from everyone!Please and thank you!
May 05, 2012 02:52 PM|LINK
May 06, 2012 07:32 AM|LINK
you can use onerror method of the image tag to set a default content place holder if the images is not found or broken.
<img onerror="test(this);" src="......." />
Please 'Mark as Answer' if this post helps you.
May 10, 2012 02:55 AM|LINK
Apology bcz i reply late!!
Thanks for help me.And now i solved my problem with both of ways that you give me.
That's very strange to me and very useful to avoid problem with image.
Thanks both of you and have a good day.!