In my application i need to construct source attribute of the IMG tag dynamically. I have imgaes created accorindly.
ON of the iMage nme is "Disney Channel". THere for the src attribute of the Img tag is bound to /Disney Channel.gif.
With this it is searching for the image /Disney%20Channel.gif!
The image file i have is Disney Channel.gif. Due to this mismatch i am unable to display the image on the browser.
I need to know work around for this situation. Simple way would be to rename the image name itself to 'Disney%20Channel.gif' instead of 'Disney Channel.gif'. BUt this is not the best approach. Is there a simpler and better way of handling this situation?
Originally posted by Jessica Sant:
if you're going to go through the effort to rename your image files -- I'd remove the space entirely. Some browsers (like older versions of netscape) don't do well with a space in a file name unless it IS encoded.
I'm surprised that it doesn't work with the encoding.
Ultimately thsts what i ended up doing. I removed the spaces in between the names of the image. This works fine.
Thanks for your comments