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

Passing + sign to via XML to server side request

I am using javascript to build XML and pass it to the .Net Server Side VB
Script page.

So I build the XML string as follows in javascript...

xml_string = "<tagname>" + escape(var_to_pass) + "</tagname>"

On the server I use httputility.urldecode(hidden_xml_string.value) to decode
the XML.

The problem is that the "+" sign is converted to nothing.

I found that I can use encodeURIComponent() on the client in the javascript,
and things work OK, but...

Is there a way to do the same thing using escape()?

Thanks in advance.

Jim
Nov 22 '05 #1
2 1356


Jim M wrote:
I am using javascript to build XML and pass it to the .Net Server Side VB
Script page.

So I build the XML string as follows in javascript...

xml_string = "<tagname>" + escape(var_to_pass) + "</tagname>"

On the server I use httputility.urldecode(hidden_xml_string.value) to decode
the XML.

The problem is that the "+" sign is converted to nothing.

I found that I can use encodeURIComponent() on the client in the javascript,
and things work OK, but...

Is there a way to do the same thing using escape()?


Why does the unescaped + hurt you inside of some XML element's content?
I don't see why that is a problem.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Nov 22 '05 #2


Jim M wrote:
I am using javascript to build XML and pass it to the .Net Server Side VB
Script page.

So I build the XML string as follows in javascript...

xml_string = "<tagname>" + escape(var_to_pass) + "</tagname>"

On the server I use httputility.urldecode(hidden_xml_string.value) to decode
the XML.

The problem is that the "+" sign is converted to nothing.

I found that I can use encodeURIComponent() on the client in the javascript,
and things work OK, but...

Is there a way to do the same thing using escape()?


Why does the unescaped + hurt you inside of some XML element's content?
I don't see why that is a problem.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Nov 22 '05 #3

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

Similar topics

9
by: cooldv | last post by:
i know how to replace the sign " when SUBMITTING a form in asp by this code: message = Replace(usermessage, "'", "''"). My problem is DISPLAYING data in an asp FORM, from an an access database,...
2
by: Jim M | last post by:
I am using javascript to build XML and pass it to the .Net Server Side VB Script page. So I build the XML string as follows in javascript... xml_string = "<tagname>" + escape(var_to_pass) +...
11
by: Joey Martin | last post by:
I am passing a sql string thru my querystring for the next page to capture. example: www.xxxxxxxx.com/index.asp?str=select * from table where name like '%doe%' Passing a basic string works...
5
by: Jack | last post by:
Hi, I need to pass multple variables in a link in order to go to a asp page with the two varables. The following are the values of the variables using response.write: <%'Response.Write Mypage...
27
by: Oscar | last post by:
I am looking for a way to pass an ADO recordset that has been retrieved in an ASP page to another HTML-page. Is there someone who can provide me with a small sample or a link to see how this is...
6
by: KKramsch | last post by:
OK, here's the scenario: I have a CGI script that generates a page with frames (BTW, I'm not crazy about frames, but in this case the decision to use them is out of my hands). In a typical...
3
by: Abby Lee | last post by:
My code works but because I'm using VBscript within JavaScript I get an error message...the yellow tri-angle with an "!" mark. ---------------within my body------------- <script...
10
by: vbMark | last post by:
Hello, I am doing this: window.location="page2.php?subj="+subj+"&body="+body; to send information to another page. However, I don't want that second page to show up or display in any way....
6
by: Ken Allen | last post by:
I am relatively new to .Net and C#, but I hav ebeen programing in other languages and done some COM work for a number of years. I am attempting to understand how to map an older program...
8
by: pt36 | last post by:
I have two pages one.html two.html page one.html have a form named form1 and a textarea named text1 man one write in the textarea text 1 page two.html have a form named form2 and a...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
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...

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.