Monday, September 30, 2013

Creating a dynamic text field that changes content depending on select list choice?

Creating a dynamic text field that changes content depending on select
list choice?

Me and my colleague are in the process of starting up our own company that
handles exam results and school data. I am currently in the process of
setting up the webpage (I am completely new with PHP and Dreamweaver CC)
where the end-user can access and edit the database in the extent that
they need to.
But I shall get to the point of my problem. At the moment I am trying to
build a data edit page where all relevant data is shown once the user has
logged in (In this case it's an admin-kind of person, so he/she needs to
see which teacher teaches which classes). On this page I want to build a
drop-down list of all the possible Classes (done this with the recordset,
sorted alphabetically and working) and linking to that, a dynamic text
field that changes value depending on the option picked in the select
list.
Example:
There are four classes, and four corresponding teachers as followed:
Class - Teacher
English - Bob
Spanish - Juan
Math - Jenny
Geography - William
What I'm basically after is that if you choose the Class 'English' in the
drop-down select list, the text field should display 'Bob' (and similarly
for all the other classes). So far I've not managed to work out how to do
that in Dreamweaver CC.
Help is much appreciated!

No comments:

Post a Comment