View Full Version : Syntax error on Swissarmy slide show

11-15-2012, 10:07 PM
1) Script Title: Swissarmy slide show

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

3) Describe problem: I'm using Dreamweaver CS4 as my web editor. When viewing the slide show in preview mode, under the description where it shows the slide number, it looks like "Viewing Image: 1�of 30" when previewing in Firefox, and in IE, instead of the question mark in a diamond, it's an empty box.

11-19-2012, 10:28 AM
There is no � character in the script at that point. Depending upon the encoding, there could be one here:

Viewing Image: 1 of�30

But then again, it may depend upon how you saved it as well as the encoding. In any case try this - Using a text only editor like NotePad, open up the swissarmy.js file and find this line (around line number 119):

document.write('<div align="center">Viewing Image: <b><span id="thecnt'+this.issid+'"><\/span><\/b> of<span style="font-size:1ex;">&nbsp;</span>&nbsp;<b>'+this.imgs.length+'<\/b><\/div>');

It may or may not look exactly like that. Notice the highlighted space and the highlighted &nbsp; token.

Regardless of what it looks like (it might be a � character, or look like a normal space, or be more than one character including a space or not), highlight whatever is there and type a space character into it. If the &nbsp; token is not there, replace whatever is there with a &nbsp; token. Save the file and use that.

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

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.