Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 4th, 2003, 05:12 AM
Authorized User
 
Join Date: Jun 2003
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hidden field looses value after submit

Hi All,

I have :

document.forms[0].Update.value='yes';
document.myForm.submit;

in a routine.

I have declared a Hidden field called Update in my form. I have checked before the submit that the value does actually get set, but after Submission the value of Update is empty. I have checked everywhere and this is the only place in the page that this value is set.

Does anybody have any idea why my value is being lost on submit. My form is declared :
<FORM NAME="myForm" action="AgentDetail.asp" method="post">



 
Old December 4th, 2003, 05:30 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

What do you mean by "after submission"? At the server, or back again at the client?

If you're expecting the value again at the client, you'll need to use some ASP to write it back to the hidden field.

If the value doesn't arrive at the server, you should check some other things:

1. Is myForm the first form in the page? That is, is forms[0] equal to myForm? For consistency, you may decide to use the same naming scheme.
2. Is the Update field located in the right form?
3. Is Update a reserved word? Can't imagine, but you never know....

If this doesn't help, can you please post some more code so it's easier to see what may be causing the problem.....

Cheers,

Imar



---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
pass value to the hidden field Dejitan ASP.NET 1.0 and 1.1 Basics 4 December 21st, 2006 03:13 AM
Hidden Field value error - PLEASE HELP jroxit Classic ASP Basics 5 September 18th, 2006 05:46 AM
Hidden field ashoka_klt ASP.NET 1.0 and 1.1 Basics 1 September 6th, 2006 07:12 AM
Validating a hidden field mkerchenski ASP.NET 1.0 and 1.1 Basics 1 June 3rd, 2004 11:20 AM
How to assign a value to a hidden field? Edward King Javascript How-To 1 May 3rd, 2004 07:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.