473,469 Members | 1,638 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

VERY simple question about Javascript in XSL. One line!

Put simple I would like to have this line in my XSL template:

document.writeln("<a href='http://www.mydomain.com/user/login.php'
class='login'>")

My XML parser seems to be breaking on the single quotes. Do you know
how I can use double quotes? Or even single quotes? I have tried using
a backslash, and even tried using their numeric and character values.
I am really unsure of how to use these things together in the correct
way. Thank you so much!
Jul 20 '05 #1
2 1972
Gene Ellis wrote:
Put simple I would like to have this line in my XSL template:

document.writeln("<a href='http://www.mydomain.com/user/login.php'
class='login'>")

My XML parser seems to be breaking on the single quotes. Do you know
how I can use double quotes? Or even single quotes? I have tried using
a backslash, and even tried using their numeric and character values.
I am really unsure of how to use these things together in the correct
way. Thank you so much!


escape " with &quot;
escape ' with &apos;
escape < with &lt;
escape > with &gt;
escape & with &amp;

--
Cordialement,

///
(. .)
-----ooO--(_)--Ooo-----
| Philippe Poulard |
-----------------------
Jul 20 '05 #2
In article <a7**************************@posting.google.com >,
Gene Ellis <ge********@ucop.edu> wrote:

% Put simple I would like to have this line in my XSL template:
%
% document.writeln("<a href='http://www.mydomain.com/user/login.php'
% class='login'>")

Well, what have you tried? It's difficult to make suggestions without
any context at all.
% My XML parser seems to be breaking on the single quotes.

It seems to be, but it's probably breaking on <. In this case,
the anchor tag is data, not an XML element, so you need to
treat it as data. You could try
<![CDATA[document.writeln("<a href='http://www.mydomain.com/user/login.php'
class='login'>")]]>

If that doesn't help, post a short example of what you're trying now.
--

Patrick TJ McPhee
East York Canada
pt**@interlog.com
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Aaron Prohaska | last post by:
I have just run into a problem where I have a page that posts back to itself to execute code, except when the page does the post back it somehow executes code that is in our home page for the site....
4
by: Owen Parker | last post by:
Hi all I am not a java programmer but i can hack at it a bit. I am trying to allow a user to define the text in a simple javascript text scroller. The data is stored as multiple records in a...
11
by: Frag | last post by:
Hi guys, I searched around without any clear answer. Tons of stuff, but nothing concrete. I am trying to call this Javascript function: function ButtonClicked() { alert("The button has...
12
by: Albert Grennock | last post by:
Hi, Hope this is the right forum to ask in. Anyway in IE I go to this site and I click on computing on the left hand menu and it takes from about 6 to 15 seconds to open the submenu. I then...
73
by: Claudio Grondi | last post by:
In the process of learning about some deeper details of Python I am curious if it is possible to write a 'prefix' code assigning to a and b something special, so, that Python gets trapped in an...
29
by: Knut Olsen-Solberg | last post by:
I try to change the text in a <p> using getElementById(). I wonder what properties exists, and which one to use here. (The following does not work.) Regards Knut ______________________ ...
3
by: modermo | last post by:
Hey new to javascript figuring out how to fix this darn problem. I employ an image rollover, and it works beautifully in safari. But in firefox, the image has an annoying blue border around...
112
by: Prisoner at War | last post by:
Friends, your opinions and advice, please: I have a very simple JavaScript image-swap which works on my end but when uploaded to my host at http://buildit.sitesell.com/sunnyside.html does not...
6
by: Terry Carroll | last post by:
I am trying to do something with a very large tarfile from within Python, and am running into memory constraints. The tarfile in question is a 4-gigabyte datafile from freedb.org,...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.