When you say a second field what do you mean?
An HTML element or the SQL database?
Which SQL database are you using?
What scripting lanuage are you using for your server side script?
What is the layout of your code?
Remember example code answers a whole bunch of questions that you will otherwise have to explicitly answer.
(I have assumed that since you are using JavaScript we are taking about a web page but you have not stated it).
Hi ... Many thanks for the response.
You are correct...It is a webpage.
- When i say field, i am refering to a textarea on a html form.
- The SQL Database is MS SQL - Not sure which version
- Scripting is done using Java and Javascript
I have tried some code already but it has failed dismally... So i have no working code to show you an example of :(
I am using a webpage to write data back to a SQL Database. All the fields that i need are already in the SQL database. When i submit/save my html form, it writes the data that is currently stored in the fields to the SQL database.
What i need is as follows: I want to put a drop down box on my HTML form. So, when using the form, i want to select an option from the drop down list and have the next two/three fields autopopulate information based on the drop down box eg:
Drop Down box containsa list of cities
Field 1 (Text Area 1) Needs to hold city as selected in the drop down box
Field 2 (Text Area 2) Should autopopulate the country where the city is i.e Ireland
Field 3 (Text Area 3) Should autopopulate the country's timezone ie. GMT
I know that i need to have the lists somewhere (i.e. - If the drop down selection is dublin, Country=Ireland , Timezone=GMT, but where i have them, how i refer to them and how i write the values to the next 3 fields is where i'm stuck
Your help is really appreciated with this.
Thanks, :confused: