ASP / Hidden text box issue

Discussion in 'ASP General' started by Andrew Durstewitz, Oct 30, 2003.

  1. Hi!

    I am having a really strange issue. I have a few users calling in
    saying they are getting an error. On further review I found this line is
    what is causing it...

    Set strLookup = cnAddStep.Execute ("SELECT * FROM ActionSteps WHERE
    planId = '" & intPlanId & "' ORDER BY stepId DESC")

    The exact peice causing it is intPlanId. For some reason the form
    request isn't getting the ID.

    intPlanId = Request.Form("hdnPlanId")

    intPlanId is populated from a hidden text box in the previous page. But
    only on a very few users machines will the post not occure. Any ideas?

    Thanks,
    Andrew J Durstewitz

    DEVBuilder.org, http://www.DEVBuilder.org
    ASP,ASP.NET,VB.NET,PHP,Java,and SQL Support, all in one place.
     
    Andrew Durstewitz, Oct 30, 2003
    #1
    1. Advertising

  2. Andrew Durstewitz

    Bob Barrows Guest

    Andrew Durstewitz wrote:
    > Hi!
    >
    > I am having a really strange issue. I have a few users calling in
    > saying they are getting an error. On further review I found this line
    > is what is causing it...
    >
    > Set strLookup = cnAddStep.Execute ("SELECT * FROM ActionSteps WHERE
    > planId = '" & intPlanId & "' ORDER BY stepId DESC")


    This must be difficult to debug. Set your sql statements to a variable so
    you can use response.write to verify what they contain.
    >
    > The exact peice causing it is intPlanId. For some reason the form
    > request isn't getting the ID.
    >
    > intPlanId = Request.Form("hdnPlanId")
    >
    > intPlanId is populated from a hidden text box in the previous page.
    > But only on a very few users machines will the post not occure.


    ? If the post did not occur, how could this asp code be executing?

    > Any ideas?
    >

    Are you using client-side code to put the value into the hidden textbox? If
    so, does the client machine have scripting turned off?

    Do any of the Form variables have values? Is it only this one that has no
    value? If so, I would blame the client-side code.

    Bob Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows, Oct 30, 2003
    #2
    1. Advertising

  3. Bob,

    >Set your sql statements to a variable so
    >you can use response.write to verify what they >contain.


    I have done this, for most users they get the ID, but for a VERY few
    they don't get anything.

    >? If the post did not occur, how could this asp >code be executing?


    What I meant was that they are posting the page but the value of the
    hidden form item isn't getting there.

    The hidden form is being populated from the QueryString value passed to
    it.

    What I am starting to think is that the user has some sort of security
    turned on that doesn't allow them to submit hidden data? Is that
    possible?

    The user is using IE 5.5.0

    Thanks,
    Andrew J Durstewitz

    DEVBuilder.org, http://www.DEVBuilder.org
    ASP,ASP.NET,VB.NET,PHP,Java,and SQL Support, all in one place.
     
    Andrew J Durstewitz, Oct 30, 2003
    #3
  4. Andrew Durstewitz

    Rob Meade Guest

    "Andrew J Durstewitz" wrote ...

    > What I am starting to think is that the user has some sort of security
    > turned on that doesn't allow them to submit hidden data? Is that
    > possible?


    Not as far as I am aware - although that would be fun to have to code
    around!

    Best practice here would probably be to just view the source of the page
    that has the form on it for one of the users.

    This way you can see if the value is there or not in the hidden element. If
    the hidden element doesn't have a value then its not retrieving the data
    correctly in the first place (or you have records without these Id's etc)..

    I'm betting that the form is sending the info correctly, and your next page
    is processing it correctly, its just the values not getting to the form in
    the first place...

    Have a looky!

    Regards

    Rob
     
    Rob Meade, Oct 30, 2003
    #4
  5. Andrew Durstewitz

    Bob Barrows Guest

    Andrew J Durstewitz wrote:
    > Bob,
    >
    > The hidden form is being populated from the QueryString value passed
    > to it.


    Using client-side code? Or a direct <%=request.querytring ...%>?
    >
    > What I am starting to think is that the user has some sort of security
    > turned on that doesn't allow them to submit hidden data? Is that
    > possible?
    >

    I've never heard of anything like this. Do you have any validation code to
    ensure that this textbox has been populated before the form is submitted?

    Is the problem intermittent, or does it always occur on a particular user's
    machine?

    Bob Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows, Oct 30, 2003
    #5
  6. Andrew Durstewitz

    Don Verhagen Guest

    In news:3fa15caf$0$201$,
    Andrew J Durstewitz <> typed:
    : Bob,
    :
    :: Set your sql statements to a variable so
    :: you can use response.write to verify what they >contain.
    :
    : I have done this, for most users they get the ID, but for a VERY few
    : they don't get anything.


    :: ? If the post did not occur, how could this asp >code be executing?
    :
    : What I meant was that they are posting the page but the value of the
    : hidden form item isn't getting there.
    :
    : The hidden form is being populated from the QueryString value passed
    : to it.

    The querystring could be the culprit. Check to make sure the hidden input is
    being properly sent from the querystring.
    i.e <input type="hidden" name="hdnPlantID" value="">


    : What I am starting to think is that the user has some sort of security
    : turned on that doesn't allow them to submit hidden data? Is that
    : possible?

    Umm...no, at least not form fields


    Don
     
    Don Verhagen, Oct 30, 2003
    #6
  7. "Andrew J Durstewitz" wrote:
    >
    > The hidden form is being populated from the QueryString
    > value passed to it.


    Change the type to "text" and find out.


    > What I am starting to think is that the user has some sort
    > of security turned on that doesn't allow them to submit
    > hidden data? Is that possible?
    >
    > The user is using IE 5.5.0


    I'm unaware of any version of IE that disallows hidden inputs. Any chance
    the input sits outside the <form> tags?


    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
     
    Dave Anderson, Oct 30, 2003
    #7
  8. Ok, I think I figured out the problem. I had the user attempt this on a
    co-workers machine within the same organization. It worked.

    It really sounds like to me that IE isn't running right for the user.

    I have validated the data for the user. They are getting the data to
    the page that has the hidden form but on post it losses it.

    After a re-install of IE (maybe upgrade to IE6) hopefully this issue
    will go away.

    Thanks everyone,
    Andrew

    DEVBuilder.org, http://www.DEVBuilder.org
    ASP,ASP.NET,VB.NET,PHP,Java,and SQL Support, all in one place.
     
    Andrew J Durstewitz, Oct 30, 2003
    #8
  9. Andrew Durstewitz

    Dan Brussee Guest

    A hidden form field is often used to hold a value that is chosen from
    some other source on the page. Is it possible that you are using
    Javascript to populate the hidden field, and they have Javascript
    turned off?


    On 30 Oct 2003 22:09:42 GMT, Andrew J Durstewitz
    <> wrote:

    >Ok, I think I figured out the problem. I had the user attempt this on a
    >co-workers machine within the same organization. It worked.
    >
    >It really sounds like to me that IE isn't running right for the user.
    >
    >I have validated the data for the user. They are getting the data to
    >the page that has the hidden form but on post it losses it.
    >
    >After a re-install of IE (maybe upgrade to IE6) hopefully this issue
    >will go away.
    >
    >Thanks everyone,
    >Andrew
    >
    >DEVBuilder.org, http://www.DEVBuilder.org
    >ASP,ASP.NET,VB.NET,PHP,Java,and SQL Support, all in one place.
     
    Dan Brussee, Oct 30, 2003
    #9
  10. I'm not using a javascript to populate the feild. I am doing a
    response.write into the feild it's self.

    Also, keep in mind that it WORKS for 99% of users. It's just a few who
    where having this problem.

    Thanks,
    Andrew J Durstewitz

    DEVBuilder.org, http://www.DEVBuilder.org
    ASP,ASP.NET,VB.NET,PHP,Java,and SQL Support, all in one place.
     
    Andrew Durstewitz, Oct 31, 2003
    #10
    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. Gnarlodious
    Replies:
    4
    Views:
    17,704
    elizas
    May 5, 2010
  2. SSG
    Replies:
    1
    Views:
    157
    ThatsIT.com.au
    Jan 12, 2007
  3. Raga
    Replies:
    3
    Views:
    471
  4. calfliu
    Replies:
    6
    Views:
    156
    Michael Winter
    Feb 25, 2004
  5. SolarCanine
    Replies:
    2
    Views:
    338
    SolarCanine
    Sep 20, 2005
Loading...

Share This Page