Brett_A
Fri Apr 18 21:51:58 CDT 2008
On Apr 18, 3:26 pm, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcom>
wrote:
> Brett_A wrote:
> > I have a form where the first field is a dynamic drop-down that pulls
> > from a db (Access). The fields associated with the query are task_id,
> > task_name and task_rate. The field has the value of "task_id" and the
> > label of "task_name".
>
> > In the second form field, I would like the default value to be
> > determined by the selection made in the first field. Based on the
> > selection of the first form field, I would like the default value of
> > the this field (task_rate) to be populated with the associated
> > task_rate value of the selection chosen above.
>
> This is typically done in client-side code so it is more appropriately
> asked in a client-side scripting group such as
> microsoft.public.scripting.jscript
> However, you can look here to get a head start and narrow your question
> down to more specific issues:
http://classicasp.aspfaq.com/forms/how-do-i-make-one-dropdown-depend-...
>
> While the client-side scripting is the major part of the solution, there
> may be server-side asp issues as well that we will be happy to address
> here.
>
> --
> 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.
The first form field is a dynamically populated list. The second form
field is a text box, not another list. The value to populate the
second text box is a value that needs to be pulled from the database
determined by the value of the selected value from the first form
field. I don't want a page refresh which is what seems to happen if I
set it up as outlined in the samples suggested.Something has to happen
on the server side to retrieve that value before any onchange event
can update the second field with the proper value doesn't it? Is this
a place where I need to implement some AJAX?
Thanks
Brett