Results 1 to 9 of 9

Thread: Img Paths once FTP'd

  1. #1
    Join Date
    Jul 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Img Paths once FTP'd

    Script: Text and Image Crawler
    http://www.dynamicdrive.com/dynamici...wler/index.htm

    I added this great little script to my site and it worked perfectly (locally), previews correctly in Frontpage and previews correctly in any Browser.

    However when i FTP the page up to the hosted server and make the page live on my website none of the images (img src="") show. Theres just a gap where they would be. The ticker tape text does display still.

    Im assuming its due to it being unable to resolve the image paths once on the hosted server? I made sure i put the images in the same directory as the rest of the website (the crawler.js is also in the same dir).

    code below:

    Code:
    <head>
    <script type="text/javascript" src="crawler.js">
    /*
    Text and/or Image Crawler Script 2009 John Davenport Scheuer
    as first seen in http://www.dynamicdrive.com/forums/ username: jscheuer1
    This Notice Must Remain for Legal Use
    */
    </script>
    Code:
    <div class="marquee" id="mycrawler2">
    <img src="surgery2.jpg" width="208" height="155" /> 
    <img src="surgery3.jpg" width="208" height="155" /> 
    <img src="surgery.jpg" width="208" height="155" /> 
    <img src="newwait.jpg" width="208" height="155" /> 
    <img src="niallsrm.jpg" width="208" height="155" /> 
    <img src="prem.jpg" width="208" height="155" />   
    <img src="ebroom.jpg" width="208" height="155" />  
    
    </div>
    
    <script type="text/javascript">
    marqueeInit({
    	uniqueid: 'mycrawler2',
    	style: {
    		'padding': '2px',
    		'width': '600px',
    		'height': '162px'
    	},
    	inc: 5, //speed - pixel increment for each iteration of this marquee's movement
    	mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
    	moveatleast: 1,
    	neutral: 150,
    	savedirection: true
    });
                    </script>
                    
     <div class="marquee" id="mycrawler">
     * ticker text goes here. *
    </div>
    
    <script type="text/javascript">
    marqueeInit({
    	uniqueid: 'mycrawler',
    	style: {
    		'padding': '5px',
    		'width': '600px',
    		'background': 'lightyellow',
    		'border': '1px solid #CC3300'
    	},
    	inc: 8, //speed - pixel increment for each iteration of this marquee's movement
    	mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
    	moveatleast: 2,
    	neutral: 150,
    	savedirection: true
    });
                    </script>
    I tried right clicking the images in my hosted htdocs folder to get the full path but it doesnt give it me, assuming its the full path i need? how do i find it please??

  2. #2
    Join Date
    Aug 2004
    Posts
    9,918
    Thanks
    3
    Thanked 969 Times in 957 Posts
    Blog Entries
    15

    Default

    Have you simply tried changing the image srcs so they are absolute URLs, ie:

    Code:
    <img src="http://mysite.com/images/surgery2.jpg" width="208" height="155" />
    DD Admin

  3. #3
    Join Date
    Jul 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i havent as im not sure what the correct url would be and i dont know if linking it that way might increase the page load time?
    Im pretty sure someone else must've come across the same issue but i cant find anything using the search button so far.

  4. #4
    Join Date
    Aug 2004
    Posts
    9,918
    Thanks
    3
    Thanked 969 Times in 957 Posts
    Blog Entries
    15

    Default

    Quote Originally Posted by Rich B View Post
    i havent as im not sure what the correct url would be and i dont know if linking it that way might increase the page load time?
    Im pretty sure someone else must've come across the same issue but i cant find anything using the search button so far.
    Using absolute URLs shouldn't affect page load times at all. As far as the correct URL, that would simply be the full URL to the images you wish to show inside the Crawler, such as http://mysite.com/images/surgery2.jpg
    DD Admin

  5. #5
    Join Date
    Jul 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ill give it a try, although it does mean testing it on the live site.

  6. #6
    Join Date
    Jul 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

  7. #7
    Join Date
    Aug 2004
    Posts
    9,918
    Thanks
    3
    Thanked 969 Times in 957 Posts
    Blog Entries
    15

    Default

    Just in case you missed it, you did remember to substitute "mywebsite.com" in the image URLs with your actual domain right?
    DD Admin

  8. #8
    Join Date
    Jul 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    yes thanks

  9. #9
    Join Date
    Jul 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    well i never knew that!
    i tried just calling already known and used images from the browser like http://www.mywebsite.com/knowntoworkimage.jpg and then tried calling the new images i wanted in the crawler like http://www.mywebsite.com/surgery2.jpg.

    The known ones displayed as expected the NEW images did not. For some reason when i resized the images in paint (i didnt have access to my photoshop pc at the time) it changed the file extensions from "jpg" to "JPG"

    My script wasnt finding the images because the extensions were uppercase.

    Its working now, many thanks for your input as it guided me towards finding the problem.
    (dynamicdrive link added in thanks)
    Last edited by Rich B; 07-15-2009 at 03:12 PM.

Bookmarks

Posting Permissions

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