...

View Full Version : Difficulty attaching Javascript file to my document.



Cat_Fuzz
04-30-2011, 01:33 PM
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.


<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.


<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.

_Aerospace_Eng_
04-30-2011, 03:55 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum