PDA

View Full Version : Swissarmy not working in IE



vikki3
10-19-2011, 10:28 PM
1) Script Title: Swissarmy slideshow

2) Script URL (on DD):

3) Describe problem: I have put the swiss army slide show on to a page on my web site but it does not show up in IE, its fine in chrome and ff. Could anyone shed any light on this please. The code is

Head:

<style type="text/css">

/* All Styles Optional */

* {
font-family:arial;
font-size:10pt;
}
div#show3 {
background-color:#efefef;
width:140px;
margin:0 auto;
border:1px solid #444444;
}
div#show3 table td, div#show4 table td {
height:24px;
background-image:url('38.gif');
}
div#show4 table td {
background-image:url('40.gif');
}
div#show3 table input, div#show4 table input {
outline-style:none;
}
</style>

<!--[if IE]>
<style type="text/css">
div#show3 table td, div#show4 table td {
height:21px;
}
</style>
<![endif]-->

<script type="text/javascript">

//If using image buttons as controls, Set image buttons' image preload here true
//(use false for no preloading and for when using no image buttons as controls):
var preload_ctrl_images=true;

//And configure the image buttons' images here:
var previmg='left.gif';
var stopimg='stop.gif';
var playimg='play.gif';
var nextimg='right.gif';


var slides2=[]; //SECOND SLIDESHOW
//configure the below images and descriptions to your own.
slides2[0] = ["Colognebeechmain.jpg", "Crucifix"];
slides2[1] = ["DuleekHGBurgundy.jpg", "Alter Boys"];
slides2[2] = ["DuleekHGTiepolo&Burgundy.jpg", "Young Pan"];
slides2[3] = ["DuleekHGZebrano.jpg", "Mona Lisa"];
slides2[4] = ["DuleekLightTiepolo.jpg", "Mona Lisa"];
slides2[5] = ["MTMCologneivory.jpg", "Mona Lisa"];
slides2[6] = ["PhoenixHGMiraCosa.jpg", "Mona Lisa"];
slides2[7] = ["PVCEdgedaubergineroomset.jpg", "Mona Lisa"];
slides2[8] = ["SlabOntarioMaple.jpg", "Crucifix"];
slides2[9] = ["Tuscany5pcHornsIvorymain.jpg", "Crucifix"];



//optional properties for these images:
slides2.desc_prefix='<b>Description:<\/b> '; //string prefix for image descriptions display
slides2.controls_top=1; //use for top controls
slides2.counter=1; //use to show image count
slides2.width=500; //use to set width of widest image if dimensions vary
slides2.height=407; //use to set height of tallest image if dimensions vary
slides2.no_auto=1; //use to make show completely user operated (no play button, starts in stopped mode)
slides2.use_alt=1; //use for descriptions as images alt attributes
slides2.use_title=1; //use for descriptions as images title attributes
slides2.nofade=1; //use for no fade-in, fade-out effect for this show
slides2.border=2; //set border width for images
slides2.border_color='white'; //set border color for images

slides3.manual_start=1; //start show in manual mode (stopped)

//Notes:
//slides#.target will set a target for a slide group, will be overridden by slides#[#][3], if present
//slides#.specs will set new window specifications for a slide group, will be overridden by slides#[#][4], if present
//slides#.fadecolor will set fading images background color, defaults to white
//slides#.no_controls will set a slide show with no controls
//slides#.random will set a random slide sequence on each page load
//slides#.delay=3000 will set miliseconds delay between slides for a given show, may also be set in the call as the last parameter
//slides#.jumpto=1 will display added controls to jump to a particular image by its number
//slides#.no_added_linebreaks=1; use for no added line breaks in formatting of texts and controls

//use below to create a customized onclick event for linked images in a given show:
//slides#.onclick="window.open(this.href,this.target,'top=0, left=0, width='+screen.availWidth+', height='+screen.availHeight);return false;"

</script>

<script src="swissarmy.js" type="text/javascript">

/***********************************************
* Swiss Army Image slide show script - John Davenport Scheuer: http://home.comcast.net/~jscheuer1/
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full original source code
***********************************************/

</script>

Body:

<script type="text/javascript">
//Notes on Parameters: The only required parameter is the slides_array_name. If Width is used, so must Height.
//Interval is optional too. It is always last, either fourth after Width and Height or second after Slides_array_name.
//Usage: new inter_slide(Slides_array_name, Width, Height, Interval)
new inter_slide(slides)
</script>


Any help would be most appreciated.

Thanks you

Vikki

jscheuer1
10-19-2011, 10:54 PM
It's hard to say with certainty without seeing the live page, but this line:



slides3.manual_start=1; //start show in manual mode (stopped)

should be removed because slides3 is not defined. This causes an error in all browsers. Apparently others can recover from it. Perhaps not IE.

Take it out and see what happens. There could also be other problems though.

The browser cache may need to be cleared and/or the page refreshed to see changes.

If you want more help:

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

vikki3
10-20-2011, 01:00 PM
Great thank you. It's working now after taking that piece of code out.

vikki3
10-20-2011, 10:04 PM
John

Sorry to be a nuisence but would you be able to have a look at http://www.thehorsehouse.co.uk/kitchencontemp.html. This is where the swiss army script is used. It says in IE done but with errors on the page. I have been trying to resize the pictures but when I put bigger ones on they did not show. I think there must be something else wrong. I haven't a clue what it could be.

Thanks

Vikki

jscheuer1
10-20-2011, 10:30 PM
The error in IE is also an error in others. This time it's non-fatal (can be recovered from) though, even in IE. IE however is more aggressive in reporting even non-fatal errors. Where the page has:


</div>



<!-- #BeginEditable "content" -->

<script type="text/javascript">
//Notes on Parameters: The only required parameter is the slides_array_name. If Width is used, so must Height.
//Interval is optional too. It is always last, either fourth after Width and Height or second after Slides_array_name.
//Usage: new inter_slide(Slides_array_name, Width, Height, Interval)
new inter_slide(slides)
</script>



<p></p>
<script type="text/javascript">
new inter_slide(slides2)
</script>



<!-- #EndEditable --></div>

You're not using the first one, it can and should be removed. If you want to keep the comments/instructions (lines beginning with // marks), you can change that entire section to:


</div>



<!-- #BeginEditable "content" -->

<script type="text/javascript">
//Notes on Parameters: The only required parameter is the slides_array_name. If Width is used, so must Height.
//Interval is optional too. It is always last, either fourth after Width and Height or second after Slides_array_name.
//Usage: new inter_slide(Slides_array_name, Width, Height, Interval)
new inter_slide(slides2)
</script>


<!-- #EndEditable --></div>

As for using larger images, the slides2 slideshow is currently set (from the page's source code):


slides2.width=500; //use to set width of widest image if dimensions vary
slides2.height=407; //use to set height of tallest image if dimensions vary

So anything larger than that (500px X 407px) should appear, but truncated, showing only the upper left portion that will fit in a 500 by 407 box.

If they're not showing up at all, they're probably not on the server. Or, if they are they are in different locations than what you put in the code. Or they may be there and in the right locations. If so, the upper and lower case of their paths and/or filenames are probably incorrect. Upper and lower case make a difference on most servers, not on most local machines.

Did you have a particular image in mind? Is it liste in the code on the page?

vikki3
10-21-2011, 11:00 PM
Thank you, it seems to be working although it still says error on http://www.thehorsehouse.co.uk/kitchentraditional.html, although it doesn't seem to be a problem at the moment.

Thanks again for your help.

jscheuer1
10-22-2011, 03:06 AM
Get rid of this:


<script type="text/javascript">
//Notes on Parameters: The only required parameter is the slides_array_name. If Width is used, so must Height.
//Interval is optional too. It is always last, either fourth after Width and Height or second after Slides_array_name.
//Usage: new inter_slide(Slides_array_name, Width, Height, Interval)
new inter_slide(slides)
</script>

vikki3
10-22-2011, 10:09 PM
John your a star, thanks