473,385 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

less than operartor wont work

everytime that i try to use the less than operator

function ToCurrency(amt)
{
if (amt <= -1)
{
}
}
i get the following error in the browser
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and
then click the Refresh button, or try again later.
----------------------------------------------------------------------------
----

A name was started with an invalid character. Error processing resource
'file:///C:/Documents and Settings/William Storey II/Desktop/test.xsl'. Line
12, Position 11

if (x <= -1)
----------^does anyone have any ideas as to why this happens and how to fix
it thanks wstoreyII
Jul 23 '05 #1
2 1589
"WStoreyII" <pa**********@sbcglobal.net> writes:
everytime that i try to use the less than operator .... if (amt <= -1) .... i get the following error in the browser
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and
then click the Refresh button, or try again later. .... A name was started with an invalid character. Error processing resource
'file:///C:/Documents and Settings/William Storey II/Desktop/test.xsl'. Line
12, Position 11


Why is the extension "xsl"?
My guess is that IE uses the extension to decide that the file is an
XSLT transformation. That means that it is an XML file. Inside an XML
file, the "less than" sign means something, and must be escaped.

Shouldn't it be an "html" file?

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #2
WStoreyII wrote:
everytime that i try to use the less than operator

function ToCurrency(amt)
{
if (amt <= -1)
{
}
}
i get the following error in the browser
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error
and then click the Refresh button, or try again later.


In XML, some characters like the less than operator should be translated to
their enitiy. In your case, you should write:

if (amt &lt;= -1)

Alternatively, you can also put the function definition in a CDATA section:

<script type="text/javascript">
<![CDATA[
// JS code
]]>
</script>
JW

Jul 23 '05 #3

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

Similar topics

3
by: Oliver Spiesshofer | last post by:
Hi, I have a script that calls an fopen() on an external URL. I can run the script from the server as an url fine. When however the script should be run from crontab, it does not work. I get ...
5
by: Catherine | last post by:
I am having a problem viewing asp pages on iis version 5.1 xp pro. HTML pages are viewable on http://localhost but .asp pages are not. I have created a test program called timetest.asp with the...
19
by: Allen Thompson | last post by:
sorry for the simple question, haven't done this in a while. when I use the following script it keeps displaying the value of "x" like a string. for example, if I type the number 7 in the prompt,...
4
by: Steve Westwood | last post by:
I have a WebForm button. Depending on calculation I wont to send a popup message to the web page. I am not sure of the approach. From the server side code I don't seem to be able to access the...
4
by: John Baker | last post by:
Hi: Stuck on another thing. On a report I am creating, I want to make the detail section one line vertically. However, in design view, I click on the page Footer Bar ,grab it with the "double...
5
by: Mr Newbie | last post by:
Debug.Assert( False, "Why wont I display ??") I am trying to use this in my code but it wont display. The app is running on my local machine and the above code under a button click event. What...
11
by: Bit byte | last post by:
I want to create a GUI-less windows executable (i.e. an executable that has no gui) and no console. The idea is to have this running as a kind of daemon (it can't be a service, for reasons I wont...
0
by: watashi | last post by:
Hello, This is on socket. i m using tcpclient and tcplistener task is when the "Active " button is pressed according to user choice tool should work as server or client. when "Inactive"...
0
by: sourpo | last post by:
wonder if anyone can help... I have access db with a whole lot of vb code... If i use access 2000 it works perfectly but when using 2003 it doesn't work properly. The db copies outlook mailboxes......
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.