473,394 Members | 1,674 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.

carriage return being strangely added when I perform a standard post

Hi,
I am performing a post from one classic ASP page to another in order
to get the value of a string passed between the two pages. I have a
client script variable declared to take the value of the value being
received in the page i.e. var x = '<%=varName%>'. Unfortunately, ASP
seems to be adding a carriage return to the value of varName when it
is passed in i.e. it expands the stated line to var x = 'FieldContents
';. I.e. somewhere a carriage return has been added. The string gets
passed in OK if I use the Get mechanism. Don't know why this carriage
return is being added when using Post mechanism. Anybody seen this
before? Is it a bug in ASP ?
Jul 22 '05 #1
3 2445
"Charles Gamble" wrote ...
Anybody seen this before? Is it a bug in ASP ?


Post your code up fella, the client side stuff and the handling asp page..

Regards

Rob
Jul 22 '05 #2
Thanks for the interest Rob.
Here is the form section of The calling file that is posting the
request:
<form id=RefreshPageParams name=RefreshPageParams action="Jobs.asp"
method = POST>
<INPUT type="hidden" value="" id=DefnName name=DefnName>
<INPUT type="hidden" value="" id=SearchXML name=SearchXML>
<INPUT type="hidden" value="" id=PreviousJobSearchXML
name=PreviousJobSearchXML>
<INPUT type="hidden" value="" id=PreviousJobMetaSearchXML
name=PreviousJobMetaSearchXML>
<INPUT type="hidden" value="" id=SearchType name=SearchType>
<INPUT type="hidden" value="" id=awfsessionid name=awfsessionid>
<INPUT type="hidden" value="" id=CreationType name=CreationType>
<INPUT type="hidden" value="" id=isMetaSearch name=isMetaSearch>
<INPUT type="hidden" value="" id=PreviousJobSearchType
name=PreviousJobSearchType>

</form>

Here is the code that submits the form:
//update our parameters form before we refresh
RefreshPageParams.DefnName.value = sDefnName;
RefreshPageParams.SearchXML.value = sTheSearchXML;
RefreshPageParams.PreviousJobSearchXML.value = sPreviousSearchXML;
RefreshPageParams.PreviousJobMetaSearchXML.value =
sPreviousMetaSearchXML;
RefreshPageParams.SearchType.value = SearchTypeIndicator;
RefreshPageParams.awfsessionid.value = sSessionID;
RefreshPageParams.CreationType.value ="<%=jobsearch%>";
RefreshPageParams.PreviousJobSearchType.value = sPrevJobSearchType;
RefreshPageParams.isMetaSearch.value = isMetaSearch;
RefreshPageParams.submit();

Regarding the receiving page, here is the code that receives the string
that unfortuatley contains a carriage return:
SearchXML = Request("SearchXML")

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 22 '05 #3
"Charles Gamble" wrote in message
news:e5*************@tk2msftngp13.phx.gbl...
: Thanks for the interest Rob.
: Here is the form section of The calling file that is posting the
: request:
: <form id=RefreshPageParams name=RefreshPageParams action="Jobs.asp"
: method = POST>
: <INPUT type="hidden" value="" id=DefnName name=DefnName>
: <INPUT type="hidden" value="" id=SearchXML name=SearchXML>
: <INPUT type="hidden" value="" id=PreviousJobSearchXML
: name=PreviousJobSearchXML>
: <INPUT type="hidden" value="" id=PreviousJobMetaSearchXML
: name=PreviousJobMetaSearchXML>
: <INPUT type="hidden" value="" id=SearchType name=SearchType>
: <INPUT type="hidden" value="" id=awfsessionid name=awfsessionid>
: <INPUT type="hidden" value="" id=CreationType name=CreationType>
: <INPUT type="hidden" value="" id=isMetaSearch name=isMetaSearch>
: <INPUT type="hidden" value="" id=PreviousJobSearchType
: name=PreviousJobSearchType>
:
: </form>
:
: Here is the code that submits the form:
: //update our parameters form before we refresh
: RefreshPageParams.DefnName.value = sDefnName;
: RefreshPageParams.SearchXML.value = sTheSearchXML;
: RefreshPageParams.PreviousJobSearchXML.value = sPreviousSearchXML;
: RefreshPageParams.PreviousJobMetaSearchXML.value =
: sPreviousMetaSearchXML;
: RefreshPageParams.SearchType.value = SearchTypeIndicator;
: RefreshPageParams.awfsessionid.value = sSessionID;
: RefreshPageParams.CreationType.value ="<%=jobsearch%>";
: RefreshPageParams.PreviousJobSearchType.value = sPrevJobSearchType;
: RefreshPageParams.isMetaSearch.value = isMetaSearch;
:
:
: RefreshPageParams.submit();
:
: Regarding the receiving page, here is the code that receives the string
: that unfortuatley contains a carriage return:
: SearchXML = Request("SearchXML")

You using XML but your pages are not well formed.
Have you tested the length of the value before and after posting?
Shouldn't you be using:
SearchXML = Request.Form("SearchXML")

What language is your RefreshPageParams written in?
Do you zero out variables before [re]use?

What is the value of:
sTheSearchXML
before it is added to:
RefreshPageParams.SearchXML.value

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 22 '05 #4

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

Similar topics

4
by: Les Juby | last post by:
Can someone please help with a suggestion as to how I can keep the formatting (carriage returns) that the user enters into a memo field and then display that later. I figured I might be able to...
4
by: Josh | last post by:
Hi, I'm using System.Data.DataSet.ReadXml to convert some xml from a webservice to a DataSet. The xml looks like: <?xml version="1.0"...
1
by: wschaub | last post by:
Is there any way of forcing an ASMX web service not to translate a carriage return – line feed (\r\n) with a (\n\n), in other words the carriage return \r is replaced with a \n if contained as...
2
by: Andrew Chanter | last post by:
I have a VBA function that returns a string including "vbcr" (VB Carriage Return) to seperate a list into multiple rows, eg Item1 & vbcr & Item2 & vbcr & Item3 This works as planned in the...
12
by: Nimmy | last post by:
Hi, I have a data file and I want to remove Carriage returns. Any one has any C code/program which does this? I am working on Windows XP machine.....I don't have access to UNIX machine. But I...
0
by: J.Marsch | last post by:
I am having a problem in which ASP.Net web services are corrupting my data. I know that my problem is related to the standard way of encoding carriage return linefeeds, so I need to figure out how...
5
by: Detlev808 | last post by:
Hello, I am attempting to write an awesome perl script. Before it can do anything useful, it must first be able to read in a file, and write out a file (Note: I am NOT talking about text files)....
11
by: evenlater | last post by:
My db allows the user to send email via CDO. The body of the email is determined in code. I have built an email form with To, CC and Subject lines and a large text box for the body of the message...
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
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?
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
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...

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.