carriage return being strangely added when I perform a standard post

Discussion in 'ASP General' started by Charles Gamble, Jan 25, 2005.

  1. 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 ?
     
    Charles Gamble, Jan 25, 2005
    #1
    1. Advertising

  2. Charles Gamble

    Rob Meade Guest

    "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
     
    Rob Meade, Jan 25, 2005
    #2
    1. Advertising

  3. 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!
     
    Charles Gamble, Feb 2, 2005
    #3
  4. Charles Gamble

    Roland Hall Guest

    "Charles Gamble" wrote in message
    news:...
    : 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
     
    Roland Hall, Feb 2, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    7
    Views:
    2,213
    Steven Cheng[MSFT]
    Nov 2, 2005
  2. Jeff
    Replies:
    1
    Views:
    380
    Patrice
    Jul 21, 2009
  3. Xeno Campanoli
    Replies:
    0
    Views:
    229
    Xeno Campanoli
    Feb 13, 2006
  4. Steve Anderson
    Replies:
    3
    Views:
    256
    Steve Anderson
    Jun 21, 2004
  5. Steve
    Replies:
    2
    Views:
    121
    Skye Shaw!@#$
    Aug 12, 2007
Loading...

Share This Page