Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    New Coder
    Join Date
    Nov 2007
    Location
    Florida
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question pics not showing up

    I am trying to update a page on a website I run, and I can't get the pics to show up. They show up as boxes with red 'x's in the corner. I have tried everything I can think of. I have changed the file extension, re-uploaded them to the server a number of times, etc. The link is http://www.troop760.com/venturing.html if you want to take a look. The first pic you see is supposed to be the Venturing BSA logo, and the other 7 pics at the bottom of the page are all of the ranks.

  • #2
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,077
    Thanks
    2
    Thanked 320 Times in 312 Posts
    It might be helpful if you show the folder structure that you have or want to have.

    For the first picture, the relative link you have in the code is interpreted by the browser as - http://www.troop760.com/My%20Pictures/venturing.gif

    For the others, the browser uses - http://www.troop760.com/images/your_file_names.jpg

    Accessing the image files directly using their URL results in a "URL not found on this server" error message.

    Either the path to the files is not correct or the files are not present.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #3
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,077
    Thanks
    2
    Thanked 320 Times in 312 Posts
    I guess I would ask too, how are you uploading them and after you do, can you see the files in the proper folders?
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Good morning kip1989,
    Your markup is loading a picture http://www.troop760.com/My%20Pictures/venturing.gif but the actual image is at http://www.troop760.com/images/venturing.gif

    The My Pictures folder is a local folder on your computer.

    Use this to load it - <img style="width: 102px; height: 18px;" alt="" src="../images/venturing.gif"> without the p tags.
    Last edited by Excavator; 01-12-2008 at 05:04 PM.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #5
    New to the CF scene
    Join Date
    Nov 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Also

    The file names for the medals end in gif, not jpg.

    http://www.troop760.com/images/bronze-med.jpg does not display but
    http://www.troop760.com/images/bronze-med.gif does display.

  • #6
    Regular Coder
    Join Date
    Nov 2007
    Location
    Leeds, UK
    Posts
    514
    Thanks
    24
    Thanked 19 Times in 19 Posts
    <script type="text/javascript"><!--
    function newImage(arg) {
    if (document.images) {
    rslt = new Image();
    rslt.src = arg;
    return rslt;
    }
    }
    function changeImages() {
    if (document.images && (preloadFlag == true)) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
    document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
    }
    }
    }
    // --></script>

    onmouseover="changeImages( /*CMP*/'venturing',/*URL*/'images/venturing_over.gif');return true" onmouseout="changeImages( /*CMP*/'venturing',/*URL*/'images/venturing.gif');return true"

    YOu have a script that looks like a dreamweaver image changer on hover - i hate readin this code but with this info some one else might be able to help you - sorry i couldent heklp any more

  • #7
    New Coder
    Join Date
    Nov 2007
    Location
    Florida
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by robway View Post
    The file names for the medals end in gif, not jpg.

    http://www.troop760.com/images/bronze-med.jpg does not display but
    http://www.troop760.com/images/bronze-med.gif does display.
    i have already changed the file extension to .gif, and they still dont display.

  • #8
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Umm, no you haven't.
    Code:
    [...]    <span style="font-weight: bold;"><img style="width: 116px; height: 250px;" alt="Bronze Award" src="../images/bronze-med.jpg"><img style [...]

  • #9
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,700
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    I don’t see any changes in your source code. Mind uploading what you’ve got?

    Basically, you need to change the image paths in the HTML to reflect the correct location of the file on your server, i.e. it must read

    Code:
    <img style="width: 250px; height: 200px;" alt="" src="images/venturing.gif">
    No two periods before that because that tells the browser to look for the file from one level above, i.e. from the parent directory. However, your page seems to be in the root already so it just needs to look from there.

    You can use a relative path like I showed you above, or a (server independent) absolute path that includes a slash before the path like: /images/venturing.gif

    The same path issue goes for the other images. Try to remove the periods in front of the path.

  • #10
    Regular Coder
    Join Date
    Nov 2007
    Posts
    110
    Thanks
    0
    Thanked 1 Time in 1 Post
    tjher will be many resons. first try to take the path of th picture and browse directly. if not found means picture name or path is different. if found your html code have problem. may be tag missing or syntax missing etc

  • #11
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    kip1989,
    scroll up and look at my post showing the error in your path.
    You just need to double check your filenames and paths.

    What is putting all that HUGE whitespace in your code?
    Last edited by Excavator; 01-13-2008 at 06:14 PM.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #12
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Just in case anyone is interested, I have removed the surplus spaces.

    Frank


    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
      <title>Boy Scout Troop 760 - Lakeland, Florida</title>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      <meta name="robots" content="index, follow">
      <csscriptdict></csscriptdict>
      <script type="text/javascript"><!--
    function newImage(arg) {
    if (document.images) {
    rslt = new Image();
    rslt.src = arg;
    return rslt;
    }
    }
    function changeImages() {
    if (document.images && (preloadFlag == true)) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
    document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
    }
    }
    }
    // --></script><csactiondict></csactiondict>
      <script type="text/javascript"><!--
    var preloadFlag = false;
    function preloadImages() {
    if (document.images) {
    over_home = newImage(/*URL*/'images/home_over.gif');
    over_calendar = newImage(/*URL*/'images/calendar_over.gif');
    over_photos = newImage(/*URL*/'images/photos_over.gif');
    over_roster = newImage(/*URL*/'images/roster_over.gif');
    over_leaders = newImage(/*URL*/'images/leaders_over.gif');
    over_eagles = newImage(/*URL*/'images/eagles_over.gif');
    over_links = newImage(/*URL*/'images/links_over.gif');
    preloadFlag = true;
    }
    }
    // --></script>
    </head>
    <body onLoad="preloadImages();" leftmargin="0" topmargin="0" style="background-color: rgb(255, 255, 255); background-image: url(images/wood_background.gif);" link="#00008b" marginheight="0" marginwidth="0" vlink="#00008b">
    <!-- ImageReady Slices (Untitled-1) --><br>
    <table align="center" background="images/sub_background.gif" border="0" cellpadding="0" cellspacing="0" width="5%">
      <tbody>
        <tr>
          <td width="33"> <img src="images/top_left.gif" alt="" height="33" width="33"></td>
          <td background="images/top_border.gif" width="70%">
          </td>
          <td width="33"> <img src="images/top_right.gif" alt="" height="33" width="33"></td>
        </tr>
        <tr valign="top">
          <td background="images/left_border.gif" width="33">
          </td>
          <td align="center" valign="top" width="70%">
          <p><img src="images/spacer.gif" alt="" border="0" height="5" width="40"><img src="images/banner.gif" alt="Boy Scout Troop 760 Lakeland, Florida" border="0" height="114" width="608"><br>
              <br>        
              <img src="images/bar1.gif" alt="" border="0" height="16" width="567"><br>
                <a onMouseOver="changeImages( /*CMP*/'home',/*URL*/'images/home_over.gif');return true" onMouseOut="changeImages( /*CMP*/'home',/*URL*/'images/home.gif');return true" href="index.html"><img src="images/home.gif" alt="Home" name="home" border="0" height="22" width="58"></a><img src="images/spacer.gif" alt="" border="0" height="1" width="12"><a onMouseOver="changeImages( /*CMP*/'calendar',/*URL*/'images/calendar_over.gif');return true" onMouseOut="changeImages( /*CMP*/'calendar',/*URL*/'images/calendar.gif');return true" href="http://www.troop760.com/cgi-bin/calendar/calendar.cgi"><img src="images/calendar.gif" alt="Calendar" name="calendar" border="0" height="22" width="90"></a><img src="images/spacer.gif" alt="" border="0" height="1" width="11"><a onMouseOver="changeImages( /*CMP*/'photos',/*URL*/'images/photos_over.gif');return true" onMouseOut="changeImages( /*CMP*/'photos',/*URL*/'images/photos.gif');return true" href="/Troop760PhotoGallery//index.php"><img src="images/photos.gif" alt="Photos" name="photos" border="0" height="22" width="70"></a><img src="images/spacer.gif" alt="" border="0" height="1" width="15"><a onMouseOver="changeImages( /*CMP*/'roster',/*URL*/'images/roster_over.gif');return true" onMouseOut="changeImages( /*CMP*/'roster',/*URL*/'images/roster.gif');return true" href="roster.html"><img src="images/roster.gif" alt="Roster" name="roster" border="0" height="22" width="68"></a>
              <img src="images/spacer.gif" alt="" border="0" height="1" width="7"><br>
                <a onMouseOver="changeImages( /*CMP*/'patrols',/*URL*/'images/patrols_over.gif');return true" onMouseOut="changeImages( /*CMP*/'patrols',/*URL*/'images/patrols.gif');return true" href="patrols.html"><img style="width: 77px; height: 22px;" src="images/patrols.gif" alt="Patrols" name="patrols" border="0"></a><img src="images/spacer.gif" alt="" border="0" height="1" width="14"><a onMouseOver="changeImages( /*CMP*/'leaders',/*URL*/'images/leaders_over.gif');return true" onMouseOut="changeImages( /*CMP*/'leaders',/*URL*/'images/leaders.gif');return true" href="leaders.html"><img src="images/leaders.gif" alt="Leaders" name="leaders" border="0" height="22" width="78"></a><img src="images/spacer.gif" alt="" border="0" height="1" width="16"><a onMouseOver="changeImages( /*CMP*/'eagles',/*URL*/'images/eagles_over.gif');return true" onMouseOut="changeImages( /*CMP*/'eagles',/*URL*/'images/eagles.gif');return true" href="eagles.html"><img src="images/eagles.gif" alt="Eagles" name="eagles" border="0" height="21" width="64"></a>
              <img src="images/spacer.gif" alt="" border="0" height="1" width="12"><a onMouseOver="changeImages( /*CMP*/'links',/*URL*/'images/links_over.gif');return true" onMouseOut="changeImages( /*CMP*/'links',/*URL*/'images/links.gif');return true" href="links.html"><img src="images/links.gif" alt="Links" name="links" border="0" height="22" width="58"></a><img src="images/spacer.gif" alt="" border="0" height="1" width="18"><br>
            <img src="images/spacer.gif" alt="" border="0" height="1" width="12"><a onMouseOver="changeImages( /*CMP*/'venturing',/*URL*/'images/venturing_over.gif');return true" onMouseOut="changeImages( /*CMP*/'venturing',/*URL*/'images/venturing.gif');return true" href="venturing.html"><img src="images/venturing.gif" alt="Venturing" name="venturing" border="0"></a><img src="images/spacer.gif" alt="" border="0" height="1" width="18"><br>
              <img src="images/bar2.gif" alt="" border="0" height="16" width="567"><br>
              </p>
          <p><img style="width: 250px; height: 200px;" alt="" src="images/venturing.gif"></p>
          <p style="font-weight: bold;">Welcome to Venturing Crew 760's homepage.</p>
          <p style="font-weight: bold;">Venturing Crew 760 meets on Wednesday nights from 7 - 8 PM.</p>
          <span style="font-weight: bold;">
    If you are interested in joining our crew,&nbsp;you can contact <br>
    us through the </span><a style="font-weight: bold;" href="http://www.firstumc.org/">First United Methodist Church.</a><br>
          <br>
          <p><img src="images/bar2.gif" alt="" border="0" height="16" width="567"></p>
          <big style="font-weight: bold;"><big><big><big>
    What Is Venturing?</big></big></big></big><br>
          <br>
          <p style="font-weight: bold;"><big>"Venturing is a youth development program of the Boy Scouts of America for 
    young men and women who are 14 (and have completed the eighth grade) through 20 
    years of age.</big></p>
          <p style="font-weight: bold;"><big>Venturing's purpose is to provide positive experiences to help young people 
    mature and to prepare them to become responsible and caring adults.</big></p>
          <p style="font-weight: bold;"><big>Venturing is based on a unique and dynamic relationship between youth, adult 
    leaders, and organizations in their communities. Local community organizations 
    establish a Venturing crew by matching their people and program resources to the 
    interests of young people in the community. The result is a program of exciting 
    and meaningful activities that helps youth pursue their special interests, grow, 
    develop leadership skills, and become good citizens."&nbsp;</big></p>
          <p style="font-weight: bold;"><big>-Boy Scouts of America National Council</big></p>
          <p style="font-weight: bold;"><big><span style="text-decoration: underline;">Ranks</span></big></p>
          <span style="font-weight: bold;"><img style="width: 116px; height: 250px;" alt="Bronze Award" src="images/bronze-med.jpg"><img style="width: 116px; height: 250px;" alt="Gold Award" src="images/gold-med.jpg"></span><span style="font-weight: bold;"><img style="width: 115px; height: 250px;" alt="Silver Award" src=".images/silver-med.jpg"></span><span style="font-weight: bold;"></span>
          <p style="text-align: center; font-weight: bold;">From left to right: Venturing Bronze Award, Gold Award, Silver Award.</p>
          <p style="text-align: center;"></p>
          <p style="text-align: center;"><img style="width: 150px; height: 300px;" alt="Ranger Award" src="images/ranger-new.jpg"><img style="width: 150px; height: 300px;" alt="Shooting Sports" src="images/shooting.jpg"><img style="width: 150px; height: 300px;" alt="Trust Award" src="images/trust.jpg"><img style="width: 150px; height: 300px;" alt="Quest Award" src="images/quest.jpg"></p>
          <p><span style="font-weight: bold;"></span><span style="font-weight: bold;"></span><br>
              <span style="font-weight: bold;">From left to right: Venturing Ranger Award, Shooting Sports, Trust, Quest.</span><br><br>
              <b><img src="images/spacer.gif" alt="" border="0" height="1" width="630"></b></p>
          </td>
          <td background="images/right_border.gif" width="33"><br>
          </td>
        </tr>
        <tr>
          <td width="33"> <img src="images/bottom_left.gif" alt="" height="33" width="33"></td>
          <td background="images/bottom_border.gif" width="70%">
          </td>
          <td width="33"> <img src="images/bottom_right.gif" alt="" height="33" width="33"></td>
        </tr>
      </tbody>
    </table>
    <br>
    <!-- End ImageReady Slices -->
    </body>
    </html>
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •