Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: How to Javascript slide show superscript

  1. #1
    Join Date
    Jan 2010
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default How to Javascript slide show superscript

    Hi Guys:

    I have a bit of a dilemma. I have a slide show script which i got here http://www.dynamicdrive.com/dynamici...nslideshow.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?

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    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.
    Corrections to my coding/thoughts welcome.

  3. The Following User Says Thank You to bluewalrus For This Useful Post:

    earnest (01-11-2010)

  4. #3
    Join Date
    Jan 2010
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Here is the script
    Code:
    <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: ""
    })
    
    
    
    </script>
    Last edited by Snookerman; 01-11-2010 at 07:37 PM.

  5. #4
    Join Date
    Jan 2010
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thanks a lot for your help

  6. #5
    Join Date
    Jan 2010
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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

  7. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Like if you have:

    Code:
    "This is "my" description"
    Yes, that will give an error, do it like so:

    Code:
    "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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. The Following User Says Thank You to jscheuer1 For This Useful Post:

    earnest (01-11-2010)

  9. #7
    Join Date
    Jan 2010
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    John, thanks a lot. How do i get the trademark - ® to show up and show up superscript

  10. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I thought the the trademark was like:

    Xerox

    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:

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

    Code:
    <sup>\u00ae<\/sup>
    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  11. #9
    Join Date
    Jan 2010
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    John, thanks for you help. I add this <sup>\®<\/sup> and it worked
    here is the site alaba____mastay.com (remove underscores)
    Last edited by jscheuer1; 01-12-2010 at 01:00 AM. Reason: add underscores to prevent indexing

  12. #10
    Join Date
    Jan 2010
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    actually this ( &#174is in the middle of the sup

Bookmarks

Posting Permissions

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