Results 1 to 4 of 4

Thread: Crawler problems.

  1. #1
    Join Date
    Mar 2010
    Posts
    14
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default Crawler problems.

    1) Script Title: Text and Image Crawler

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

    3) Describe problem:

    a) Putting a <br> between images results in the images on the first row not being in line with the second row

    b) changing the height attribute is the same effect as distance from top i.e. 'height'='500px' results in a 'top'='500px'. I wish to place the images using percentages, but this doesnt work.

    Many thanks for your help.

    The webpage's at http://t2pictures.com/webpages/template.html

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You obviously cannot have any line breaks in the crawler <br> included. If you do, the crawler won't be all in one line. If you need text or anything beneath each image, crawl a table. Each cell may have whatever you like in it. Please be more specific about:

    I wish to place the images using percentages
    If you mean the width of the crawler, it cannot be any wider than the train of the crawler, regardless of what percentage width you set it to. It needs to have enough content to fill out the width specified, otherwise it will have be narrower than expected.

    I'd suggest getting rid of:

    Code:
    <link rel="stylesheet" type="text/css" href="../js css/gallerystyle.css" />
          
    <!-- Do not edit IE conditional style below -->
    <!--[if gte IE 5.5]>
    <style type="text/css">
    #motioncontainer {
    width:expression(Math.min(this.offsetWidth, maxwidth)+'px');
    }
    </style>
    <![endif]-->
    <!-- End Conditional Style -->
    
    <script type="text/javascript" src="../js css/motiongallery.js">
    
    /***********************************************
    * CMotion Image Gallery- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
    * This notice must stay intact for legal use
    * Modified by Jscheuer1 for autowidth and optional starting positions
    ***********************************************/
    
    </script>
    as well as anything else you aren't using. It potentially confuses things to have old code lying around, and might be causing problems. Also, until you have things working, skip:

    Code:
    <script language=JavaScript>
    <!--
    
    //Disable right click script III- By Renigade (renigade@mediaone.net)
    //For full source code, visit http://www.dynamicdrive.com
    
    var message="";
    ///////////////////////////////////
    function clickIE() {if (document.all) {(message);return false;}}
    function clickNS(e) {if 
    (document.layers||(document.getElementById&&!document.all)) {
    if (e.which==2||e.which==3) {(message);return false;}}}
    if (document.layers) 
    {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
    else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
    
    document.oncontextmenu=new Function("return false")
    // --> 
    </script>
    It's worthless anyway. But even if you like it for whatever reason, it could be causing a problem. It certainly makes it harder to diagnose the page.

    I would also suggest getting rid of:

    Code:
    <script type="text/javascript" src="../js css/oodomimagerollover.js">
    
    /***********************************************
    * DOM Image Rollover II- By Adam Smith (http://www.codevendor.com)
    * Script featured on and available at Dynamic Drive (http://www.dynamicdrive.com)
    * Keep this notice intact for usage please
    ***********************************************/
    
    </script>
    at least until you have the crawler working to your satisfaction. That (DOM Image Rollover II) script doesn't appear to present any problems, but might. If you want to get something working (like in this case the crawler), work with it alone first. I mean use your page and its markup, sure - you have to. But don't add in other scripts until you have the one you are concerned with working.
    - John
    ________________________

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

  3. #3
    Join Date
    Mar 2010
    Posts
    14
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Thanks, I removed the old scripts as per your advice.

    Is there a way to set the height of the train to be a certain percentage of the screen's height?

    Also, the train works on FF and IE, but it doesn't seem to work on Safari and Chrome. Any help?

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Your markup is invalid (don't get scared, it just means that it doesn't follow standards). You have an odd situation here:

    Code:
    	<a href="../webpages/Paint.html"> <img border="0" src="../images/Thumbs/Paint T.jpg"> </a>
    	</td>
    </tr>
    </div>
    
    <script type="text/javascript">
    marqueeInit({
    	uniqueid: 'mycrawler2',
    	style: {
    		'padding': '2px',
    		'width': '100%',
    		'height': '500px',
    		'border': '2px'
    	},
    	inc: 15, //speed - pixel increment for each iteration of this marquee's movement
    	mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
    	stopped: true,
    	moveatleast: 0,
    	neutral: 150,
    	savedirection: true
    });
    </script>
    You are closing the div before you close the table and the table never gets formally closed. Technically the the div cannot be closed yet and the table isn't. Various browsers will attempt to error correct this in various ways, some won't even try, and some may muddle through because the script itself changes the markup if it ever gets a chance to run. This may or may not be the problem in Safari and Chrome. Try fixing it:

    Code:
    	<a href="../webpages/Paint.html"> <img border="0" src="../images/Thumbs/Paint T.jpg"> </a>
    	</td>
    </tr></table>
    </div>
    
    <script type="text/javascript">
    marqueeInit({
    	uniqueid: 'mycrawler2',
    	style: {
    		'padding': '2px',
    		'width': '100%',
    		'height': '500px',
    		'border': '2px'
    	},
    	inc: 15, //speed - pixel increment for each iteration of this marquee's movement
    	mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
    	stopped: true,
    	moveatleast: 0,
    	neutral: 150,
    	savedirection: true
    });
    </script>
    As to your other question, the crawler can be made (via additional javascript) to be a percentage of the window height, but this won't change the height of the images in it or of the padding/margin whatever is used to position the images within the crawler. If I knew more specifically what you were after I may be able to come up with something that does that. Be aware though that if you resize the images they may become distorted. The aspect ratio can probably be maintained, but the resolution probably will get fuzzy and/or jagged. And when you resize by height while keeping the same aspect ratio, you will be changing the length of the train, this may or may not have undesirable consequences in tall windows that are narrow and/or short windows that are wide.
    - John
    ________________________

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

  5. The Following User Says Thank You to jscheuer1 For This Useful Post:

    ranteo (04-29-2010)

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
  •