Forums
This topic is locked
How do I populate a hidden field..........
Posted 12 Jun 2002 01:16:33
1
has voted
12 Jun 2002 01:16:33 John Angelini posted:
......with a value based on a dynamic dropdown?I have a dropdown that allows you to pick a category for uploading files, and when I select the name, I need to have a hidden field whose value (number) is equal to the corresponding dropdown selection that updates if a new selection is made. I would submit the value as the value for the dropdown but I need both bvalues, the text value (from the dropdown) and the numeric value (which updates in the hidden field).
I have an idea for a way to try it with a jump menu that returns to the same page with a new parameter in the URL, which I can use Request.QueryString("CategoryID"

Anyone think this would work or have any other suggestions?
Thanks
John Angelini
The Puppet Masters, Inc.
www.thepuppetmasters.com
Replies
Replied 12 Jun 2002 01:45:16
12 Jun 2002 01:45:16 aegis kleais replied:
I've never found a way for UD4 to do this automatically. However, open up the code view and goto the VALUE of the hidden field and type this in
<%= RecordsetName.Fields.Item("fldValue"
.Value %>
Where RecordsetName = the name of the dynamic recordset
Where fldValue = the name of the field you want to populate the hidden field with
<%= RecordsetName.Fields.Item("fldValue"

Where RecordsetName = the name of the dynamic recordset
Where fldValue = the name of the field you want to populate the hidden field with