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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?UmFnYQ==?=

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

    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
  • Adrienne Boswell

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

    Gazing into my crystal ball I observed =?Utf-8?B?UmFnYQ==?=
    <Raga@discussio ns.microsoft.co mwriting in
    news:BA1B10AD-532E-4F1E-9856-B67CE36ACF9F@mi crosoft.com:
    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="<%=strOr dID%>"&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
    Arbpen Consulting will help you harness valuable insights and translate them into tangible results by merging data and strategy.

    Please respond to the group so others can share

    Comment

    • Marc

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


      "Raga" <Raga@discussio ns.microsoft.co mwrote in message
      news:BA1B10AD-532E-4F1E-9856-B67CE36ACF9F@mi crosoft.com...
      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


      Comment

      • =?Utf-8?B?UmFnYQ==?=

        #4
        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==?=
        <Raga@discussio ns.microsoft.co mwriting in
        news:BA1B10AD-532E-4F1E-9856-B67CE36ACF9F@mi crosoft.com:
        >
        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="<%=strOr dID%>">
        </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
        Arbpen Consulting will help you harness valuable insights and translate them into tangible results by merging data and strategy.

        Please respond to the group so others can share
        >
        >

        Comment

        Working...