
July 19th, 2005, 09:20 AM
| | | ASP / Hidden text box issue
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. | 
July 19th, 2005, 09:20 AM
| | | Re: ASP / Hidden text box issue
Andrew Durstewitz wrote:[color=blue]
> 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")[/color]
This must be difficult to debug. Set your sql statements to a variable so
you can use response.write to verify what they contain.[color=blue]
>
> 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.[/color]
? If the post did not occur, how could this asp code be executing?
[color=blue]
> Any ideas?
>[/color]
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. | 
July 19th, 2005, 09:20 AM
| | | Re: ASP / Hidden text box issue
Bob,
[color=blue]
>Set your sql statements to a variable so
>you can use response.write to verify what they >contain.[/color]
I have done this, for most users they get the ID, but for a VERY few
they don't get anything.
[color=blue]
>? If the post did not occur, how could this asp >code be executing?[/color]
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. | 
July 19th, 2005, 09:20 AM
| | | Re: ASP / Hidden text box issue
"Andrew J Durstewitz" wrote ...
[color=blue]
> 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?[/color]
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 | 
July 19th, 2005, 09:20 AM
| | | Re: ASP / Hidden text box issue
Andrew J Durstewitz wrote:[color=blue]
> Bob,
>
> The hidden form is being populated from the QueryString value passed
> to it.[/color]
Using client-side code? Or a direct <%=request.querytring ...%>?[color=blue]
>
> 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?
>[/color]
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. | 
July 19th, 2005, 09:20 AM
| | | Re: ASP / Hidden text box issue
In news:3fa15caf$0$201$75868355@news.frii.net,
Andrew J Durstewitz <adurstewitz@moreheadassociates.com> 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 | 
July 19th, 2005, 09:20 AM
| | | Re: ASP / Hidden text box issue
"Andrew J Durstewitz" wrote:[color=blue]
>
> The hidden form is being populated from the QueryString
> value passed to it.[/color]
Change the type to "text" and find out.
[color=blue]
> 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[/color]
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. | 
July 19th, 2005, 09:20 AM
| | | Re: ASP / Hidden text box issue
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. | 
July 19th, 2005, 09:20 AM
| | | Re: ASP / Hidden text box issue
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
<adurstewitz@moreheadassociates.com> wrote:
[color=blue]
>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.[/color] | 
July 19th, 2005, 09:21 AM
| | | Re: ASP / Hidden text box issue
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. |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over network members.
|