Results 1 to 2 of 2

Thread: Problem with Frog.js

  1. #1
    Join Date
    Aug 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Problem with Frog.js

    1) Script Title: frog.js

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

    3) Describe problem: When I preview my site on Dreamweaver (before uploading to internet), the image viewer works perfectly--but, after uploading the files to my site and viewing the "live" website, the image viewer does not work. Here's a link to one of the pages which incorporates this java script that doesn't work: http://www.thepurplefrogdesigns.com/...rdSamples.html

    Any help would be greatly appreciated as I need to have this working as soon as possible.

    Thanks!!!

  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 have an open tag spanning a script that it shouldn't:

    Code:
    							<div id="FrogJS">
    
                                  <p><a href="Samples/BusinessCards/1.jpg">
                                    <img src="Samp . . . 
     . . . essCards/29_thumb.jpg"/></a>
    				
    <!-- BEGIN SCRIPT TO HIDE THUMBNAILS WHILE GALLERY LOADS -->
    		<script type="text/javascript">
    		<!--
    			var ribbit = document.getElementById('FrogJS');
    			
    			// Adds loading message to FrogJS DIV
    			ribbit.innerHTML += 'Please wait while gallery loads<br /><img src="images/loading.gif" />';
    			
    			// Hides thumbnails while gallery loads
    			var anchors = ribbit.getElementsByTagName('a');
    			for (var i=0; i<anchors.length; i++){
    				anchors[i].style.display = 'none';
    			}
    		-->
    		</script>
    
    		<!-- END SCRIPT TO HIDE THUMBNAILS WHILE GALLERY LOADS -->
                                  </p>
                                  </div>
    Move it's closing tag to before that script:

    Code:
                                  . . .<a href="Samples/BusinessCards/27.jpg" >
                                      <img src="Samples/BusinessCards/27_thumb.jpg"/></a>
                            
    								   <a href="Samples/BusinessCards/29.jpg" >
                                      <img src="Samples/BusinessCards/29_thumb.jpg"/></a>
                                  </p>				
    <!-- BEGIN SCRIPT TO HIDE THUMBNAILS WHILE GALLERY LOADS -->
    		<script type="text/javascript">
    		<!--
    			var ribbit = document.getElementById('FrogJS');
    			
    			// Adds loading message to FrogJS DIV
    			ribbit.innerHTML += 'Please wait while gallery loads<br /><img src="images/loading.gif" />';
    			
    			// Hides thumbnails while gallery loads
    			var anchors = ribbit.getElementsByTagName('a');
    			for (var i=0; i<anchors.length; i++){
    				anchors[i].style.display = 'none';
    			}
    		-->
    		</script>
    
    		<!-- END SCRIPT TO HIDE THUMBNAILS WHILE GALLERY LOADS -->
    
                                  </div>
    Added Info:

    Or, you could just get rid of both the opening and closing <p></p> tags. I don't think they are really doing anything.
    Last edited by jscheuer1; 08-25-2007 at 07:53 AM. Reason: add info
    - John
    ________________________

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

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
  •