View Full Version : How to Javascript slide show superscript

01-11-2010, 06:59 PM
Hi Guys:

I have a bit of a dilemma. I have a slide show script which i got here http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

I want to superscript a trademark (R) symbol ( CFRT® )as you can see in the menu example here: alabamastay.com. The symbol is superscript.

I have placed the symbol in the words that appear in the slideshow photos but the symbol is not showing at all.

What can i do to fix this problem?

01-11-2010, 07:11 PM
You might have to use the entity for it, &reg; or &_#174; <--delete the "_" there. If not can you provide a link, or the code this error is demonstrable with.

01-11-2010, 07:16 PM
Here is the script

<script type="text/javascript">

var mygallery=new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [969, 360], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["http://alabamastay.com/pmc-flash/computer.jpg", "", "_new", "Products Made With CFRT® Are Tougher!"],
["http://alabamastay.com/pmc-flash/plane.jpg", "", "_new", "Products Made With CFRT® Are Stonger!"],
["http://alabamastay.com/pmc-flash/many.jpg", "", "_new", "Composites Materials For Every Industry"],
["http://alabamastay.com/pmc-flash/car.jpg", "", "_new", "CFRT® 'The Supercharged Plastic'"],
["http://alabamastay.com/pmc-flash/sailing.jpg", "", "_new", "CFRT® 'The Material Edge'"],
["http://alabamastay.com/pmc-flash/sewing.jpg", "", "_new", "Uni-Directional Tape, Sheet, Components, Engineered Solutions"]

displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 3000, //transition duration (milliseconds)
descreveal: "always",
togglerid: ""


01-11-2010, 07:16 PM
Thanks a lot for your help

01-11-2010, 07:19 PM
oh, for photo 4 and 5 i want to add quotation marks. i have single quotation right now but i really need double quotes, but i keep getting an error or blank slide

01-11-2010, 10:27 PM
Like if you have:

"This is "my" description"

Yes, that will give an error, do it like so:

"This is \"my\" description"

and it will be fine.

General rule - Like quotes used inside a string delimited by those quotes must be escaped by the down slash (\), as shown above.

01-11-2010, 10:50 PM
John, thanks a lot. How do i get the trademark - ® to show up and show up superscript

01-11-2010, 11:56 PM
I thought the the trademark was like:


What you have is (I believe) the registered mark.

Either way it can be complicated. But perhaps not. If it's not showing up on your page even when it's part of the plain HTML code, your document isn't being served with the proper encoding, and/or is not encoded properly to begin with.

So, the first question is - Does it show up when it's part of the page as ordinary HTML text?

If it is, you could probably use the Unicode scripted entity for it in your script code:


To make that appear superscript in a javascript string that will be written as HTML:


But if that string is to be made a part of the DOM via being imported as a textNode, it will have to be appended to a sup element. But I don't think that's what's happening here, though it may be.

As I say though, it may not be all that complex, but may be.

To really diagnose this it would be easier if we had a link to your page:

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

01-12-2010, 12:26 AM
John, thanks for you help. I add this <sup>\®<\/sup> and it worked
here is the site alaba____mastay.com (remove underscores)

01-12-2010, 12:27 AM
actually this ( &#174;)is in the middle of the sup

01-12-2010, 12:47 AM
Looks good here, so you are saying this is solved to your satisfaction? If not, what's the problem? Even if you are happy now, feel free to come back if other problems arise with this or anything else we can help you with.

For best compatibility though, as long as it still works, I'd replace (in your javascript string code):


and other similar javascript strings with: