ASP / Hidden text box issue

A

Andrew Durstewitz

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.
 
B

Bob Barrows

Andrew said:
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
 
A

Andrew J Durstewitz

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.
 
R

Rob Meade

...
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
 
B

Bob Barrows

Andrew said:
Bob,

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

Using client-side code? Or a direct said:
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
 
D

Don Verhagen

In Andrew J Durstewitz <[email protected]> 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
 
D

Dave Anderson

Andrew J Durstewitz said:
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.
 
A

Andrew J Durstewitz

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.
 
D

Dan Brussee

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?
 
A

Andrew Durstewitz

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top