Image is not showing in HTML

Discussion in 'HTML & Website Design' started by BalachandarR, Feb 9, 2010.

  1. #1
    Hi,

    I have written a html file ,in this i planned to display some images.Like this I am trying to load lot of images but same images.After loading the page i can able to view some images but not fully.Instead of displaying image blank space is displayed.But Image is there.Because if i right click on the empty space then i can able to click the Show picture from short cut menu.After that image is displayed.

    My code is looking like this

    aTagObj.getElementsByTagName("img").item(0).src = "images/icons/doc_disabled.gif";

    I have written the above code in for loop.

    How do i display the images without any problem.
     
    BalachandarR, Feb 9, 2010 IP
  2. LeetPCUser

    LeetPCUser Peon

    Messages:
    711
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This looks to be JavaScript. Chances are you want to use PHP instead. You could use a for loop by utilizing an array storing the image names, or if they are named in order with numbers you could loop them through with a count.
     
    LeetPCUser, Feb 9, 2010 IP
  3. itpartner

    itpartner Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    you can try with this java script:

    or you can try it easily with php
    ok ? enjoy
     
    itpartner, Feb 11, 2010 IP
  4. y2k2

    y2k2 Guest

    Messages:
    212
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    yes i agree with this
     
    y2k2, Feb 11, 2010 IP