Truncation of Hidden text box values in Classic ASP - freakish.

Discussion in 'ASP General' started by Raga, Mar 30, 2007.

  1. Raga

    Raga Guest

    Hi,

    We have found a very freakish ‘truncate’ behavior in Classic ASP application
    (that is called from within a web logic portal).

    We have an ASP variable, lngOrderId (an oracle sequence number that right
    now running in 8000+) in our ASP page.

    The current value of this variable (got from the session) is 8095.

    In order to pass the value to the next page, we set the variable’s value to
    a Hidden INPUT field and pass it to the next form.
    Here is the code snippet that does this task:
    Response.Write "<!— Sample debug write " & lngOrderId & " -->"
    strHTMLString = strHTMLString & "<input type=""hidden"" name=strOrdID
    value=""" & lngOrderId & """>"
    Response.Write strHTMLString

    Now the first line correctly displays 8095 in the ViewSource.
    But in the same view source I see that the above hidden variable (strOrdID)
    has a value of 95 !

    This happens only with particular variable and does not affect the other
    variables.
    We are unable to reason out why this is happening and it looks very very
    freakish.

    One weirdness in this scenario is – the ASP application is called from
    within a weblogic portal.

    Could this be a bug in ASP? Any ideas?

    Thanks,
    Raga
    Raga, Mar 30, 2007
    #1
    1. Advertising

  2. Gazing into my crystal ball I observed =?Utf-8?B?UmFnYQ==?=
    <> writing in
    news::

    > In order to pass the value to the next page, we set the variableƒ Ts
    > value to a Hidden INPUT field and pass it to the next form.
    > Here is the code snippet that does this task:
    > Response.Write "<!ƒ " Sample debug write " & lngOrderId & " -->"
    > strHTMLString = strHTMLString & "<input type=""hidden"" name=strOrdID
    > value=""" & lngOrderId & """>"
    > Response.Write strHTMLString
    >


    What happens if you completely drop out of ASP, and do:
    %>
    <pre>
    &lt;!-- Sample debug write <%=lngOrderId%> --%gt;
    &lt;input type="text" name="strOrdId" value="<%=strOrdID%>"&gt;
    </pre>
    My news reader is inserting some strange looking characters, and I don't
    know if they might be affecting what you are trying to do. See if the
    same happens when you do the above. Further, if you use type="text"
    whilst testing, you can see it right away without viewing source.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, Mar 31, 2007
    #2
    1. Advertising

  3. Raga

    Marc Guest

    "Raga" <> wrote in message
    news:...
    > Hi,
    >
    > We have found a very freakish 'truncate' behavior in Classic ASP
    > application
    > (that is called from within a web logic portal).
    >
    > We have an ASP variable, lngOrderId (an oracle sequence number that right
    > now running in 8000+) in our ASP page.
    >
    > The current value of this variable (got from the session) is 8095.
    >
    > In order to pass the value to the next page, we set the variable's value
    > to
    > a Hidden INPUT field and pass it to the next form.
    > Here is the code snippet that does this task:
    > Response.Write "<!- Sample debug write " & lngOrderId & " -->"
    > strHTMLString = strHTMLString & "<input type=""hidden"" name=strOrdID
    > value=""" & lngOrderId & """>"
    > Response.Write strHTMLString
    >
    > Now the first line correctly displays 8095 in the ViewSource.
    > But in the same view source I see that the above hidden variable
    > (strOrdID)
    > has a value of 95 !
    >
    > This happens only with particular variable and does not affect the other
    > variables.
    > We are unable to reason out why this is happening and it looks very very
    > freakish.
    >
    > One weirdness in this scenario is - the ASP application is called from
    > within a weblogic portal.
    >
    > Could this be a bug in ASP? Any ideas?
    >
    > Thanks,
    > Raga


    Perhaps Oracle is spitting out unwanted characters like null, carriage
    return or a line feed...
    maybe try IsNumeric... and the suggestion Adrienne made about changing
    'hidden' to 'text' should give you some insight as well
    Marc, Apr 1, 2007
    #3
  4. Raga

    Raga Guest

    Re: Truncation of Hidden text box values in Classic ASP - freakish

    Thanks for responses Adrienne and Marc.

    We finally found the real problem. It was an issue in the Proxy code - that
    was stripping off values from textboxes that were submitted.

    thanks,
    Raga

    "Adrienne Boswell" wrote:

    > Gazing into my crystal ball I observed =?Utf-8?B?UmFnYQ==?=
    > <> writing in
    > news::
    >
    > > In order to pass the value to the next page, we set the variableÆ’ Ts
    > > value to a Hidden INPUT field and pass it to the next form.
    > > Here is the code snippet that does this task:
    > > Response.Write "<!Æ’ " Sample debug write " & lngOrderId & " -->"
    > > strHTMLString = strHTMLString & "<input type=""hidden"" name=strOrdID
    > > value=""" & lngOrderId & """>"
    > > Response.Write strHTMLString
    > >

    >
    > What happens if you completely drop out of ASP, and do:
    > %>
    > <pre>
    > <!-- Sample debug write <%=lngOrderId%> --%gt;
    > <input type="text" name="strOrdId" value="<%=strOrdID%>">
    > </pre>
    > My news reader is inserting some strange looking characters, and I don't
    > know if they might be affecting what you are trying to do. See if the
    > same happens when you do the above. Further, if you use type="text"
    > whilst testing, you can see it right away without viewing source.
    >
    > --
    > Adrienne Boswell at Home
    > Arbpen Web Site Design Services
    > http://www.cavalcade-of-coding.info
    > Please respond to the group so others can share
    >
    >
    Raga, Apr 7, 2007
    #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. manas

    Text Truncation

    manas, Jul 1, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    513
    Mark Fitzpatrick
    Jul 1, 2005
  2. Gnarlodious
    Replies:
    4
    Views:
    17,589
    elizas
    May 5, 2010
  3. JimLad
    Replies:
    0
    Views:
    447
    JimLad
    Jan 16, 2009
  4. calfliu
    Replies:
    6
    Views:
    137
    Michael Winter
    Feb 25, 2004
  5. SolarCanine
    Replies:
    2
    Views:
    276
    SolarCanine
    Sep 20, 2005
Loading...

Share This Page