473,326 Members | 2,805 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,326 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 1587
"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......
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.