473,378 Members | 1,544 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,378 software developers and data experts.

Invalid character in string reference

Is there anything 'wrong' with setting the value of a drop down menu
using the following?

document.frmStep1.drpInvaddress.value = 'A1020761603!>\>R2'

This string is a key in our database that I have no control over and I
want to set the value of the menu according to this value because it
is unique. I suspect that the '\' or the '>' or the '!' is making
Javascript think that this is a different type of data than string.

Is there a way to 'force' Javascript to interpret this as string?
Jul 23 '05 #1
2 2223
On Wed, 26 May 2004 13:06:10 -0700, Dan McCloud wrote:
Is there anything 'wrong' with setting the value of a drop down menu using
the following?

document.frmStep1.drpInvaddress.value = 'A1020761603!>\>R2'

This string is a key in our database that I have no control over and I
want to set the value of the menu according to this value because it is
unique. I suspect that the '\' or the '>' or the '!' is making Javascript
think that this is a different type of data than string.

Is there a way to 'force' Javascript to interpret this as string?


Shouldn't that be: 'A1020761603!>\\>R2'

or are you escaping the second ">"?

--
i.m.
The USA Patriot Act is the most unpatriotic act in American history.

Jul 23 '05 #2
Lee
Dan McCloud said:

Is there anything 'wrong' with setting the value of a drop down menu
using the following?

document.frmStep1.drpInvaddress.value = 'A1020761603!>\>R2'

This string is a key in our database that I have no control over and I
want to set the value of the menu according to this value because it
is unique. I suspect that the '\' or the '>' or the '!' is making
Javascript think that this is a different type of data than string.

Is there a way to 'force' Javascript to interpret this as string?


It's interpreting it as a string, but the '\' character is the
escape character in string literals. You must insert a second
backslash before it, if you want it to appear in the string value.

Jul 23 '05 #3

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

Similar topics

6
by: cgbusch | last post by:
"Character reference "&#c" is an invalid XML character" With JDOM and Xerces in Java, I get the above error with sequences. I need to be able to encode arbitrary char sequences in xml. any...
5
by: Mark | last post by:
Hello, I'm doing some data manipulation using an XML parser and am getting the following error message: Character reference "" is an invalid XML character. Any thoughts upon what this...
3
by: Kaidi | last post by:
Hello guys, I get the "an invalid XML character" error when using xerces to parse a XML file. I know that XML will correspond the &, <, >, " to special strings like "&gt;&lt;". However, how about if the...
2
by: none | last post by:
Hi, I'm opening a popup window with JavaScript. It has a command button. This is from the primary source (opener) window: ###################################################################...
1
by: Eric | last post by:
When I run my script it gives error on the following line: strEmail = Right(strEmail, (Len(strEmail) - 1)) I enclose my code and the sample text file too Thanks,...
1
by: Eric | last post by:
When I run my script it gives error on the following line: strEmail = Right(strEmail, (Len(strEmail) - 1)) I enclose my code and the sample text file too Thanks,...
1
by: =?Utf-8?B?UGF1bCBQaGlsbGlwcw==?= | last post by:
I have read many things about this but I haven't got a clear vision on what to do if anything about this. I have a system that tries to find holes in my web site. One of the things it has...
1
by: eBob.com | last post by:
I have some code which is trying to determine where text will wrap in a custom text box (which Inherits from Control). It determines the number of characters which will fit in the first line, but...
1
by: =?Utf-8?B?Vmlub2Q=?= | last post by:
Hi All, I am facing an issue in the XmlTextWriter class in the dotnet 2.0. This is the sample code Actual XML is like this <Name>詳細仕様に</Name>
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
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
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...

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.