Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

simple img problem?

  • 13-10-2008 7:59pm
    #1
    Registered Users, Registered Users 2 Posts: 2,591 ✭✭✭


    Hi Guys

    Have never come across this one before and is confusing the hell outa me at the moment.
    I am using the following code to show an image on a webpage:
    <img src="./img/xxxxxx logo.jpg" alt="xxxxxx" title="xxxxxx">
    This OK in firefox but when I view the page in ie or chrome it doesn't appear, what is confusing me is that there are other images on the same page using the same code and there is no problems showing them?

    Also when I place the direct URL to the jpg in firefox it shows up ok but when I view it in IE or chrome it doesnt show at all :(

    Any ideas on what simple mistakes I am making?


Comments

  • Registered Users, Registered Users 2 Posts: 1,512 ✭✭✭stevire


    Two things you could try.

    This one is a must:
    <img src="./img/xxxxxx logo.jpg" alt="xxxxxx" title="xxxxxx" />
    Close the img tag.

    You could also try putting in the full url of the image if you havent tried that already?
    <img src="http://insertwebaddress.here/img/xxxxxx logo.jpg" alt="xxxxxx" title="xxxxxx">


  • Registered Users, Registered Users 2 Posts: 2,591 ✭✭✭tommycahir


    Just tried the closing the tag and made no difference :(
    As I said the strange thing is that the jpg doesn't show even if place the full URL into the address bar in IE but it does show in firefox.

    OK just tried it locally using IE also and am having the same issue. Is there any unusual settings in a JPG that will prevent it from being shown in IE and not in firefox?

    Any other ideas?


  • Registered Users, Registered Users 2 Posts: 2,591 ✭✭✭tommycahir


    mm right this gets even more confusing!

    I went and got a new copy of the image and saved it and now it is working ok. :S

    I would still like to know what the cause of this is as I would like to try avoid the same issues in the future.


  • Registered Users, Registered Users 2 Posts: 21,263 ✭✭✭✭Eoin


    I went and got a new copy of the image and saved it and now it is working ok. :S

    Interesting - if the actual image itself is the only thing that changed, then perhaps it wasn't saved correctly the first time, and firefox was able to display it.
    This one is a must:
    <img src="./img/xxxxxx logo.jpg" alt="xxxxxx" title="xxxxxx" />
    Close the img tag.

    For an XHTML document, you do need to close it to be valid. but I've never heard of the image not rendering because of it.


  • Registered Users, Registered Users 2 Posts: 6,570 ✭✭✭daymobrew


    tommycahir wrote: »
    I would still like to know what the cause of this is as I would like to try avoid the same issues in the future.
    My first thought was that the image was in the firefox cache and the the source image was deleted, hence not found by IE or Chrome.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 9,279 ✭✭✭RobertFoster


    ./img/xxxxxx logo.jpg
    
    Is there a space in your image name? Either rename the image without a space, or try putting in %20 instead of the space to see if that helps.


  • Moderators, Computer Games Moderators Posts: 10,462 Mod ✭✭✭✭Axwell


    <img src="./img/xxxxxx logo.jpg" alt="xxxxxx" title="xxxxxx">

    Shouldnt it be

    <img src="../img/xxxxxx logo.jpg" alt="xxxxxx" title="xxxxxx">

    the 2 dots before the /img - ../img

    Also remove the space in the file name, use an underscore or just make it one word for the filename


  • Registered Users, Registered Users 2 Posts: 6,570 ✭✭✭daymobrew


    Axwell wrote: »
    the 2 dots before the /img - ../img
    Not necessarily - the single dot says that the file is in a subdir called 'img'. Omitting the dot and slash would mean the same thing.


  • Moderators, Computer Games Moderators Posts: 10,462 Mod ✭✭✭✭Axwell


    daymobrew wrote: »
    Not necessarily - the single dot says that the file is in a 'img' subdir. Omitting the dot and slash would mean the same thing.

    I never said omit the dot and slash i said change ./ to ../ as the images directory would be in a directory on the same level as the html directory, the "../" tells it to go back on level then into images, ie out of html and into images


  • Registered Users, Registered Users 2 Posts: 21,263 ✭✭✭✭Eoin


    I think that daymobrew is saying that the ./ may be deliberate, and the image may not be in a folder that's a level up.

    Anyway, it appears that the problem was resolved by saving the image again.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 6,570 ✭✭✭daymobrew


    eoin_s wrote: »
    I think that daymobrew is saying that the ./ may be deliberate, and the image may not be in a folder that's a level up.
    Exactly. Thanks for being more clear than I was.
    @Axwell - Sorry for the confusion.


  • Moderators, Computer Games Moderators Posts: 10,462 Mod ✭✭✭✭Axwell


    daymobrew wrote: »
    Exactly. Thanks for being more clear than I was.
    @Axwell - Sorry for the confusion.

    Not at all - it was near the end of work i prob didnt read it right anyways thinking of finishing for the day :D


  • Registered Users, Registered Users 2 Posts: 1,512 ✭✭✭stevire


    Maybe it was case sensitive?? I'm seeing more and more probs with case sensitivity and browser issues...


  • Registered Users, Registered Users 2 Posts: 2,591 ✭✭✭tommycahir


    No idea why but I am now getting the same issue with 2 other image files on a different page completely. I have tried to create a fresh copy of the image but that makes no difference this turn. I am not doing anything unusual writing teh code in HTML using PSPAD and images are downloaded from gmail and then resized to 100 x 100 pixels using fsviewer.

    This is starting to wreck my head now.. :mad:


  • Registered Users, Registered Users 2 Posts: 9,279 ✭✭✭RobertFoster


    Can you link to the work here?


  • Registered Users, Registered Users 2 Posts: 2,591 ✭✭✭tommycahir


    3rd attempt at a new image seems to have got it going.. its just one those funky issues I reckon..
    fingers crossed now that I don't come across this again.


Advertisement