473,386 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Automatic form field update based on previous form value selection

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.

Any suggestions?

Thanks

Brett
Jun 27 '08 #1
9 3824
Brett_A wrote on 18 apr 2008 in microsoft.public.inetserver.asp.general:
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.

Any suggestions?
If this is a serverside code problem, show your code,
if it is clientside code or a html Q, ask elsewhere.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jun 27 '08 #2
On Apr 18, 12:59 pm, "Evertjan." <exjxw.hannivo...@interxnl.net>
wrote:
Brett_A wrote on 18 apr 2008 in microsoft.public.inetserver.asp.general:
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.
Any suggestions?

If this is a serverside code problem, show your code,
if it is clientside code or a html Q, ask elsewhere.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Are for frik'n real Evertjan?

This is an ASP forum, I'm asking an ASP question.

I don't have the code because I need some direction on how to write
the code. Did you read my question? Do you understand my question?
Did I say I already have code that isn't working?

I explain what I want and ask for suggestions. If my question isn't
clear, than I need to fix it.

Thanks

Brett
Jun 27 '08 #3
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/h...n-another.html

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.
Jun 27 '08 #4
Brett_A wrote on 18 apr 2008 in microsoft.public.inetserver.asp.general:
On Apr 18, 12:59 pm, "Evertjan." <exjxw.hannivo...@interxnl.net>
wrote:
>Brett_A wrote on 18 apr 2008 in
microsoft.public.inetserver.asp.general:
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.
Any suggestions?

If this is a serverside code problem, show your code,
if it is clientside code or a html Q, ask elsewhere.
[please do not quote signatures on usenet]
Are for frik'n real Evertjan?
Getting angry usually shows getting angry at yourself.
Don't, it does not help you.
This is an ASP forum, I'm asking an ASP question.
How can we be sure, Bret?
Many a time Qs are asked in the wrong NG.
Your Q does not specify it as such.
I don't have the code because I need some direction on how to write
the code.
So?
Did you read my question?
Yes
Do you understand my question?
Not completely, it seems not directed at a serverside problem.
Could you specify the serverside Q?
It seeme you want dynamically changing formfields content.
Did I say I already have code that isn't working?
Should you?

Yes you should.
This NG usually helps people that get stuck,
but usually does not write code for others out of the blue.
I explain what I want and ask for suggestions. If my question isn't
clear, than I need to fix it.
Help yourself.

you wrote:
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.
Seems very clientside to me!
Classic ASP does not know of forms
nor of dynamically changing formfields.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jun 27 '08 #5
this may be of some help -- demo is for dependent dropdownlists...

http://www.aspkey.net/aspkey/_articl...cle.asp?id=100
"Brett_A" <br********@gmail.comwrote in message news:94**********************************@l28g2000 prd.googlegroups.com...
>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.

Any suggestions?

Thanks

Brett

Jun 27 '08 #6
On Apr 18, 4:28 pm, "Evertjan." <exjxw.hannivo...@interxnl.netwrote:
Brett_A wrote on 18 apr 2008 in microsoft.public.inetserver.asp.general:
On Apr 18, 12:59 pm, "Evertjan." <exjxw.hannivo...@interxnl.net>
wrote:
Brett_A wrote on 18 apr 2008 in
microsoft.public.inetserver.asp.general:
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.
Any suggestions?
If this is a serverside code problem, show your code,
if it is clientside code or a html Q, ask elsewhere.

[please do not quote signatures on usenet]
Are for frik'n real Evertjan?

Getting angry usually shows getting angry at yourself.
Don't, it does not help you.
This is an ASP forum, I'm asking an ASP question.

How can we be sure, Bret?
Many a time Qs are asked in the wrong NG.
Your Q does not specify it as such.
I don't have the code because I need some direction on how to write
the code.

So?
Did you read my question?

Yes
Do you understand my question?

Not completely, it seems not directed at a serverside problem.
Could you specify the serverside Q?
It seeme you want dynamically changing formfields content.
Did I say I already have code that isn't working?

Should you?

Yes you should.
This NG usually helps people that get stuck,
but usually does not write code for others out of the blue.
I explain what I want and ask for suggestions. If my question isn't
clear, than I need to fix it.

Help yourself.

you wrote:
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.

Seems very clientside to me!
Classic ASP does not know of forms
nor of dynamically changing formfields.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
This is what you answered:

If this is a serverside code problem, show your code,
if it is clientside code or a html Q, ask elsewhere.

If you read my question, why would you ask if I had a code problem? I
hadn't gotten that fair in the development. After reading the other
answers and doing more research, it is partially client-side issue - I
think I need some AJAX to create the desired functionality. I was
asking the initial question to see where I should start - the last
sentence was "Any suggestions"? If you thought it was a client side
issue, why not answer like Bob did? It was informative without being
condescending.

Brett

Jun 27 '08 #7
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/h...opdown-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
Jun 27 '08 #8
Brett_A wrote on 19 apr 2008 in microsoft.public.inetserver.asp.general:
>Seems very clientside to me!
Classic ASP does not know of forms
nor of dynamically changing formfields.
Again: [please do not quote signatures on usenet]

This is what you answered:

If this is a serverside code problem, show your code,
if it is clientside code or a html Q, ask elsewhere.
[wrong quoting level]
If you read my question, why would you ask if I had a code problem?
Because that is the main subject of this NG,
and you did not include such problem.
I hadn't gotten that fair in the development.
Ah, so you were just fishing? "that fair"? I think not sofar.
After reading the other
answers and doing more research, it is partially client-side issue - I
think I need some AJAX to create the desired functionality.
Indeed. Ajax is in fact clientside coding technology,
as the requested html streamlayout from the server could be,
but not necessarily has to be,
prepared by serverside coding,
which coding even then is not part of AJAX technology as such.
I was
asking the initial question to see where I should start - the last
sentence was "Any suggestions"? If you thought it was a client side
issue, why not answer like Bob did? It was informative without being
condescending.
So that is the bottom line:
You are asking and at the same time think
you have a right to determine how the response should be?

While it was not my intention to be condescending,
[you could be from the west side of the great pond,
where such sensitivities excessively abound,
as seen from the rest of cyberworld,]
it won't do to expect the absence of condescence on usenet.
"Any suggestions"?
So again, show us the serverside problem, and do some initial work
yourself, and you have a good chance of getting help where you get stuck.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jun 27 '08 #9
Brett_A wrote:
On Apr 18, 3:26 pm, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcom>
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?
Right. it sounds as if you know how to accomplish the server-side aspect of
this problem.
Is this
a place where I need to implement some AJAX?
If you don't want to submit the form to get the new value, then yes, AJAX,
or something like that will be required. The client-side scripting group is
the place to get help with that.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jun 27 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: JJ | last post by:
Hi All, When someone selects a value in a select on a form I want to show the same form with another select with certain values depending on first select. How can I do this? Should I keep...
6
by: Steve Speirs | last post by:
Hi I'm trying to show/hide a simple piece of text and a text field on a form based on what choice is made from a drop down box. <select name="dropdown" size="1"> <option selected...
4
by: Vincent Yang | last post by:
I'm using Access 2002. My database is in Access 2000 format. I'm designing a form to collect responses to a 40-item questionnaire. I can fit four list boxes on a screen, so I plan to have 11 tab...
9
by: William Wisnieski | last post by:
Hello Everyone, Access 2000 I have a main form with a continuous subform. On the main form I have a text field called . It gets populated based on what the user selects in a field on the...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
14
by: Abhi | last post by:
FYI: This message is for the benefit of MS Access Community. I found that this prblem has been encounterd by many but there is hardly any place where a complete solution is posted. So I thought...
1
by: MissiMaths | last post by:
I am creating a reference table of all the information used to draw a sample. I start by first clearing the table in form1 using a delete query. Then after the user selects certain options, i...
3
by: User | last post by:
Form A (Main) Text Box 1 Text Box 2 Text Box 3 Form B (Pop-up) Choose a selection for Form A/Text Box 3 Scenario:
1
by: AndiSmith | last post by:
Hi guys, I wondered if anyone could help me with this problem, or even shed some light on the direction I need to take to resolve it? I'm using .NET 2.0 (C# flavor) to build a large user-based...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.