if you are a human please do not click here
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
Username :
Password :
Home
Help
Calendar
Register
Login
XMetaL Community Forums
»
General
»
General XMetaL Discussion
»
How to insert an ampersand (&) in a file to be used as a footer for webhelp
Pages:
1
« previous
next »
Print
Author
Topic: How to insert an ampersand (&) in a file to be used as a footer for webhelp (Read 806 times)
pebraham
Member
Posts: 16
How to insert an ampersand (&) in a file to be used as a footer for webhelp
«
on:
March 01, 2011, 07:45:18 AM »
Hi
If the footer file I use when generating webhelp includes an '&' character, the file is not included by the Webhelp generator.
For example if the following line of script is in the footer file, that file does not get included:
function mail(){parent.location = 'mailto:xx@yyy.com?Subject=Feedback &body= some text'
;}
Remove the '&' and it does get included, but of course the mailto line is not now what I want.
I have tried replacing the & with %26, but the replacement of %26 by '&' comes in too late and the '&' becomes just another part of the mail subject.
How should I specify the ampersand in the footer file?
Best regards,|
Pete
Logged
pebraham
Member
Posts: 16
Re: How to insert an ampersand (&) in a file to be used as a footer for webhelp
«
Reply #1 on:
March 02, 2011, 08:38:33 AM »
For those who had the same problem: surround the javascript code with <![CDATA[ and ]]>, like so:
<script>
<![CDATA[
javacode including characters like & < >
]]>
</script>
or even:
<script>
/* <![CDATA[ */
javacode including characters like & < >
/* ]]> */
</script>
Logged
Su-Laine Yeo
Solutions Consultant
Member
Posts: 260
Re: How to insert an ampersand (&) in a file to be used as a footer for webhelp
«
Reply #2 on:
March 04, 2011, 12:43:09 PM »
Ah, that's a useful idea. Thanks for sharing it!
Su-Laine
Logged
Su-Laine Yeo
Solutions Consultant
JustSystems Canada, Inc.
Pages:
1
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> Forum Information
=> General XMetaL Discussion
=> DITA and XMetaL Discussion
=> XMetaL Tips and Tricks
=> XMetaL Announcements and Events
Loading...