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

Home Posts Topics Members FAQ

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 1359


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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.