Results 1 to 5 of 5

Thread: SAG Content Scroller v1.3 - Content Does Not Load When Using AjaxSource Option

  1. #1
    Join Date
    Oct 2012
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default SAG Content Scroller v1.3 - Content Does Not Load When Using AjaxSource Option

    1) Script Title: SAG Content Scroller v1.3

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

    3) Describe problem: The script works great, except when I use the ajaxsource option. When I use the ajaxsource option the scroller becomes stuck displaying the loading .gif with the grey background. If I purposely use an incorrect path to the .txt file it will give an error saying 'error fetching content', but even when I try putting the file in the same directory as the .html page it still displays nothing but the loading .gif on a grey background. I tried specifying the path in the .js file, but the result was the same. I also tried using a separate script to automatically .load content into the DIV, but when I do that the scroller breaks and can no longer be scrolled automatically or manually.

    I am using FF v16.0.2 and have been using just the code on a test page.

    TXT File:
    Code:
    <ul>
    	<li>CSS is a style sheet language used to describe the presentation semantics (the look and formatting) of a document written in a markup language.</li>
    	<li>XML's design goals emphasize simplicity, generality, and usability over the Internet.</li>
    	<li>CSS is a style sheet language used to describe the presentation semantics (the look and formatting) of a document written in a markup language.</li>
    	<li>The new audio and video elements of HTML5 offer an alternative to flash for embedding multimedia on the web.</li>
    	<li>CSS is a style sheet language used to describe the presentation semantics (the look and formatting) of a document written in a markup language.</li>
    </ul>
    Page Code:
    Code:
    <html>
    	<head>
    		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    
    			<link rel="stylesheet" type="text/css" href="Scripts/sagscroller.css" />
    
    			<script src="Scripts/sagscroller.js">
    
    			/***********************************************
    			* SAG Content Scroller-  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
    			***********************************************/
    
    			</script>
    
    			<style type="text/css">
    
    			/* #SAG scroller demo #1 */
    
    			div#mysagscroller{
    			width: 200px;  /*width of scroller*/
    			height:250px;
    			}
    
    			div#mysagscroller ul li{
    			background:navy;
    			color:white;
    			padding:5px;
    			margin-bottom:5px; /*bottom spacing between each LI*/
    			}
    
    			div#mysagscroller ul li:first-letter{
    			font-size:28px;
    			background:white;
    			color:black;
    			padding:0 2px;
    			margin-right:2px;
    			}
    
    
    			/* #SAG scroller demo #2 */
    
    			div#mysagscroller2{
    			width: 250px; /*width of scroller*/
    			height:300px;
    			border:7px solid #C0C0C0;
    			}
    
    			div#mysagscroller2 ul li img{
    			border-width:0;
    			display:block; /*this causes each image to be flush against each other*/
    			}
    
    			</style>
    
    			<script>
    
    			//SAG scroller demo #1:
    
    			var sagscroller1=new sagscroller({
    				id:'mysagscroller',
    				ajaxsource: 'sagcontent.txt',
    				refreshsecs: 300,
    				mode: 'manual',
    				pause: 2500,
    				animatespeed: 400 //<--no comma following last option
    			})
    
    			//SAG scroller demo #2:
    
    			var sagscroller2=new sagscroller({
    				id:'mysagscroller2',
    				mode: 'auto',
    				pause: 2500,
    				animatespeed: 400 //<--no comma following last option
    			})
    
    		</script>
    	</head>
    	<body>
    		<div id="mysagscroller" class="sagscroller">
    			<ul>
    				<li>Ajax is a group of interrelated web development techniques used on the client-side to create interactive web applications.</li>
    				<li>XML's design goals emphasize simplicity, generality, and usability over the Internet.</li>
    				<li>SVG and HTML5's canvas element allow for the creation of simple graphical objects using programming.</li>
    				<li>The new audio and video elements of HTML5 offer an alternative to flash for embedding multimedia on the web.</li>
    				<li>CSS is a style sheet language used to describe the presentation semantics (the look and formatting) of a document written in a markup language.</li>
    			</ul>
    		</div>
    		
    		<br />
    
    		<div id="mysagscroller2" class="sagscroller">
    			<ul>
    				<li><a href="#"><img src="http://i29.tinypic.com/xp3hns.jpg" /></a></li>
    				<li><a href="#"><img src="http://i26.tinypic.com/11l7ls0.jpg" /></a></li>
    				<li><a href="#"><img src="http://i31.tinypic.com/119w28m.jpg" /></a></li>
    				<li><a href="#"><img src="http://i27.tinypic.com/34fcrxz.jpg" /></a></li>
    			</ul>
    		</div>
    	</body>
    </html>
    Last edited by Zatek; 10-31-2012 at 06:18 PM.

  2. #2
    Join Date
    Aug 2004
    Posts
    9,885
    Thanks
    3
    Thanked 962 Times in 951 Posts
    Blog Entries
    15

    Default

    Please post a link to the page on your site that contains the problematic script so we can check it out.
    DD Admin

  3. #3
    Join Date
    Oct 2012
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I don't have a site yet. I can't even get it to work on a test page. I can attach a copy though.

    The DD demo page works fine, example #2 uses the ajaxsource option, however when I go to View Source -> Save As even the demo page does the same thing as my test page. It gets stuck at the loading image when the ajaxsource option is used even though I didn't change anything. I also tried reading through the entire demo page code and made sure I corrected any relative paths but that didn't make any difference.
    Attached Files Attached Files

  4. #4
    Join Date
    Aug 2004
    Posts
    9,885
    Thanks
    3
    Thanked 962 Times in 951 Posts
    Blog Entries
    15

    Default

    So just to confirm, you haven't actually run the SAG scroller on a live web site yet, only offline? That would possibly explain why the Ajax option of the script isn't work for you. In certain browsers such as Google Chrome, Ajax is only executed when the page is being run online.
    DD Admin

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

    Zatek (10-31-2012)

  6. #5
    Join Date
    Oct 2012
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ddadmin View Post
    So just to confirm, you haven't actually run the SAG scroller on a live web site yet, only offline? That would possibly explain why the Ajax option of the script isn't work for you. In certain browsers such as Google Chrome, Ajax is only executed when the page is being run online.
    Yeah, that was the issue. I put the page on a network share and it's working now. Thanks.

Similar Threads

  1. Refresh the content on each load with Featured Content Glider
    By henkedk in forum Dynamic Drive scripts help
    Replies: 5
    Last Post: 03-17-2009, 12:32 PM
  2. Load an Ajax Tab Content inside another tab content
    By Vibam@all in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 03-05-2007, 02:20 PM
  3. Tab Content Script Option When Javascript is Disabled
    By bell1 in forum Dynamic Drive scripts help
    Replies: 7
    Last Post: 05-18-2006, 04:26 PM
  4. Dynamic Ajax Content - Print option
    By lena in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 05-08-2006, 07:52 PM
  5. Replies: 4
    Last Post: 01-27-2006, 10:51 AM

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
  •