Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Difficulty attaching Javascript file to my document.

    Hey all, I've been trying to incorporate highslide into my website for a portfolio section, and so far I have successfully created a series of thumbnails and the highslide CSS document to my server, however, when I preview in either safari or firefox, it won't actually work, instead the full size image will appear on a new window.

    I've been looking to see if I can attach the java-script file in the same manner as the highslide css, but I can't seem to figure it, I've tried Commands==>Externalize Javascript, but it won't let me.

    If someone could point me in the right direction, I would be most thankful.

    Code:
            <script type="text/javascript" src="../highslide/highslide-with-gallery.js"></script>
    <link rel="stylesheet" type="text/css" href="../highslide/highslide.css" />
    
    <script type="text/javascript">
    	hs.graphicsDir = '../highslide/graphics/';
    	hs.align = 'center';
    	hs.transitions = ['expand', 'crossfade'];
    	hs.outlineType = 'rounded-white';
    	hs.wrapperClassName = 'controls-in-heading';
    	hs.fadeInOut = true;
    	//hs.dimmingOpacity = 0.75;
    
    	// Add the controlbar
    	if (hs.addSlideshow) hs.addSlideshow({
    		//slideshowGroup: 'group1',
    		interval: 5000,
    		repeat: false,
    		useControls: true,
    		fixedControls: false,
    		overlayOptions: {
    			opacity: 1,
    			position: 'top right',
    			hideOnMouseOut: false
    		}
    	});
    
    </script>
    
    
            <style type="text/css">
            @import url("highslide/highslide.css");
    This is the Javascript example I have, and the following piece of code is the HTML files with the highslide set-up.

    Code:
      <div class="highslide-gallery" id="content">
      				<a href="/Users/Cat_Fuzz/Desktop/Uni/Year 3/ANI_330/Website II/images/Portrait-08.jpg" class="highslide" onclick="return hs.expand(this)">
    	<img src="/Users/Cat_Fuzz/Desktop/Uni/Year 3/ANI_330/Website II/images/Portrait 08.thumb.jpg" alt="Highslide JS" width="100" height="75"
    		title="Click to enlarge" />
    </a>
    <div class="highslide-heading">
    	Portrait '08
    </div>
    I'm sorry if this seems like it's very broad, I've just got to a stage where I'm pretty frustrated with this, however, if I can help make my point clearer, please say, and I will do my best to make it so.
    Last edited by Cat_Fuzz; 04-30-2011 at 01:36 PM.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Can you post a link to your site? Nothing looks terribly wrong in your code but you likely have a JS error but didn't even try to debug it or know that you had it.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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