Results 1 to 3 of 3

Thread: problem in crawler

  1. #1
    Join Date
    Mar 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default problem in crawler

    1) Script Title: I have installed 'Text and Image Crawler'.

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...wler/index.htm

    3) Describe problem: i installed this in my website in this link "http://almoltaqa.com.eg/beta/en/index.html" the items go over itselfs check it and you will understand what i mean

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    2,038
    Thanks
    16
    Thanked 316 Times in 314 Posts
    Blog Entries
    13

    Default

    I dont see the script-call on the page - should look something like this;
    Code:
    <script type="text/javascript">
    marqueeInit({
    	uniqueid: 'mycrawler2',
    	style: {
    		'padding': '5px',
    		'width': '450px',
    		'background': 'lightyellow',
    		'border': '1px solid #CC3300'
    	},
    	inc: 5, //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,
    	persist: true,
    	savedirection: true
    });
    </script>
    Your div is also empty - you have;
    Code:
    <div class="marquee" id="mycrawler2">   
    </div>
    You should have;
    Code:
    <div class="marquee" id="mycrawler2">
    <img src="http://img42.imageshack.us/img42/6331/beachgl.jpg" /> <img src="http://img222.imageshack.us/img222/8854/waterox.jpg" /> <img src="http://img405.imageshack.us/img405/7314/cocovv.jpg" /> <img src="http://img853.imageshack.us/img853/5038/bonsaiy.jpg" />
    </div>
    Please refer to the script demo page and review the installation instructions: http://www.dynamicdrive.com/dynamici...wler/index.htm
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,165
    Thanks
    44
    Thanked 3,240 Times in 3,201 Posts
    Blog Entries
    12

    Default

    .

    Your page is in violation of Dynamic Drive's usage terms, which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.


    Code:
    <script type="text/javascript" src="../js/crawler.js"></script>
    should be:

    Code:
    <script type="text/javascript" src="../js/crawler.js">
    
    /* Text and/or Image Crawler Script v1.53 (c)2009-2011 John Davenport Scheuer
       as first seen in http://www.dynamicdrive.com/forums/
       username: jscheuer1 - This Notice Must Remain for Legal Use
    */
    
    </script>
    If you're worried about the comment not validating, it is valid. But the validator doesn't agree. You can do it like so:

    Code:
    <script type="text/javascript" src="../js/crawler.js">
    
    // Text and/or Image Crawler Script v1.53 (c)2009-2011 John Davenport Scheuer
    // as first seen in http://www.dynamicdrive.com/forums/
    // username: jscheuer1 - This Notice Must Remain for Legal Use
    
    </script>
    That said, it looks OK in Opera and Chrome. In IE 10 the images are each only 1px wide. Here, in the almoltaqa.com.eg/beta/js/main.js file:

    Code:
    	$.ajax({
    			  url: '../helper/siteHandler.php',
    			  data: {action:"getCompanies"},
    			  dataType:"json",
    			  success: function(data) {
    				
    				str = '';				
    				$.each(data, function(k,v){
    				str+= '<a href="'+v.com_link+'" style="margin:5px 10px" target="_blank"><img width=auto height="51" src="../uploaded/logos/'+v.com_pic+'" title="'+v.com_name+'"/></a>' ;
    				});
    				//alet(str);
    				$("#mycrawler2").html(str);
    				
    				marqueeInit({
    	uniqueid: 'mycrawler2',
    	style: {
    		'padding': '2px',
    
    
    	},
    	inc: 5, //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,
    	random: true
    });
    
    				}
    		 
    		});
    Let's zoom in on the above highlighted line:

    Code:
    str+= '<a href="'+v.com_link+'" style="margin:5px 10px" target="_blank"><img width=auto height="51" src="../uploaded/logos/'+v.com_pic+'" title="'+v.com_name+'"/></a>' ;
    See the width and height? Using auto there is invalid. To get the effect I'm sure you're after, use css style instead:

    Code:
    str+= '<a href="'+v.com_link+'" style="margin:5px 10px" target="_blank"><img style="width: auto; height: 51px" src="../uploaded/logos/'+v.com_pic+'" title="'+v.com_name+'"/></a>' ;
    The browser cache may need to be cleared and/or the page refreshed to see changes.
    Last edited by jscheuer1; 03-16-2013 at 07:29 AM. Reason: miss-copied original code
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Similar Threads

  1. Problem with crawler.js and IE
    By dlayland in forum Dynamic Drive scripts help
    Replies: 6
    Last Post: 04-18-2012, 07:04 AM
  2. Text and Image Crawler have problem
    By fainsonfrancis in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 04-22-2011, 11:58 AM
  3. Crawler in wordpress problem.
    By 2_k in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 07-06-2010, 02:02 PM
  4. Image Crawler problem on IE8
    By peterfarrington in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 03-23-2010, 06:39 PM
  5. Problem with Image Crawler
    By anzac351 in forum HTML
    Replies: 0
    Last Post: 07-20-2009, 02:05 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
  •