PDA

View Full Version : Resolved banner.js how to set a quotation for string



ts-d
01-24-2009, 09:20 PM
Hello,

I'm using banner.js and it's a fine instrument.

But now I try to entry the line


<a href="javascript:LeistungenWechsel("a");"><img id="a" src="Images/ci_kl.jpg" alt="corporate identity" name="a" height="75" width="75" border="0" />

But the script means, the string would be

javascript:LeistungenWechsel

because there are quotations.

Can you help?



Thanks and bye
Thomas:rolleyes:

Snookerman
01-24-2009, 09:28 PM
Use single quotes:

"javascript:LeistungenWechsel('a');"
or escape them:

"javascript:LeistungenWechsel(\"a\");"

Good luck!

ts-d
01-24-2009, 09:42 PM
Thank you - this wouldn't be the anser but nearly:

&apos;:)

Snookerman
01-24-2009, 10:04 PM
I'd suggest you use &#39; instead:
http://fishbowl.pastiche.org/2003/07/01/the_curse_of_apos/ (http://fishbowl.pastiche.org/2003/07/01/the_curse_of_apos/)
http://www.webmasterworld.com/forum119/430.htm (http://www.webmasterworld.com/forum119/430.htm)

Good luck!

ts-d
01-24-2009, 10:17 PM
I tried my syntax on the firefox brower - there was it o. k.

But on only the syntax &#39; is good for both browsers, the firefox and the Internet Explorer (7).


Thanks.:p;)

Snookerman
01-24-2009, 10:31 PM
You're welcome, glad to help! You can go to your first post in this thread, click http://www.dynamicdrive.com/forums/images/buttons/edit.gif then click Go Advanced and add the Resolved prefix to the thread title. This will let other users know the problem has been solved.

Good luck with your site!