0
Trouble with a dynamic dropdown populating a session variable

/t5/dreamweaver-discussions/trouble-with-a-dynamic-dropdown-populating-a-session-variable/td-p/519360
Apr 25, 2007
Apr 25, 2007
Copy link to clipboard
Copied
Business description: Users choose from a dyanmic drop-down
menu, the fields and values of which are set by the database. The
non-selected options provide data for a session variable that is
compared to values in the database and information is presented
accordingly. This works as planned. However, if users leave the
initally-selected option chosen, which is ok, I get this error:
ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
It happens that the same information displayed when one of the dynamic options is chosen is also appropriate when the default option is chosen. I have set the value of the default option to be the same value as one of the dynamic drop-downs (that value is $20 adults/$10 kids), and used this IF statement:
<% if (rs_recordset.Fields.Item("Column").value == "$20 adults/$10 kids") { %>
Text here
<% } %>
How do I present specific information on the resulting page if the user leaves the initially-selected option chosen in the drop-down? Thanks.
ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
It happens that the same information displayed when one of the dynamic options is chosen is also appropriate when the default option is chosen. I have set the value of the default option to be the same value as one of the dynamic drop-downs (that value is $20 adults/$10 kids), and used this IF statement:
<% if (rs_recordset.Fields.Item("Column").value == "$20 adults/$10 kids") { %>
Text here
<% } %>
How do I present specific information on the resulting page if the user leaves the initially-selected option chosen in the drop-down? Thanks.
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Guest
AUTHOR
/t5/dreamweaver-discussions/trouble-with-a-dynamic-dropdown-populating-a-session-variable/m-p/519361#M101434
Apr 25, 2007
Apr 25, 2007
Copy link to clipboard
Copied
You can set a default value of the innitially selected to
something and you can then check against that value.
For example:
<select>
<option value="NA" selected="yes">- Select Product -</option>
</select>
IF Form.Field <> "NA" Then
- blah blah blah -
End If
So it's set to NA, do nothing or show a message or whatever you want.
For example:
<select>
<option value="NA" selected="yes">- Select Product -</option>
</select>
IF Form.Field <> "NA" Then
- blah blah blah -
End If
So it's set to NA, do nothing or show a message or whatever you want.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Guest
AUTHOR
/t5/dreamweaver-discussions/trouble-with-a-dynamic-dropdown-populating-a-session-variable/m-p/519362#M101435
Apr 25, 2007
Apr 25, 2007
Copy link to clipboard
Copied
Do I put this on the resulting page after the form is
submitted?
Also, please set me straight on the syntax; I'm using ASP javascript. Thanks.
Also, please set me straight on the syntax; I'm using ASP javascript. Thanks.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

