If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

You need the textbox to change its value depending on a combo box selection. This must mean there is an onto mapping between Cbox values and Tbox values. Further it seems as if this mapping resides on the server side, as I can gather from your description of the problem.

In this scenerio the easiest way is, to do a quick Ajax call to the server with the new Cbox value when it changed, and fill the Tbox with its corresponding value on the Ajax reply.

Otherwise you will have to send the relational values and store them in a Javascript array making them accessible at the Client/Browser side, when the onChange for the Cbox is triggered.

I can lend you some code to do it, if you are stuck in syntatic overload.

Knowledge is that which can be shown to be the case, and Intelligence is the method one uses to deploy the demonstration of what is the case, everything else is Information.

(1) You will need the Ajax support routines that I can provide.
(2) The Server request handler will be filled in by you, using a sort of prototype I can outline.
(3) The HTML support with element ID's is on your page and plate.

How it will work.
(A) When the onChange for the Combo box triggers, it will call a Javascript function that will prepare an Ajax call to a specific ServerRequestHandler sitting on your Website - RequestText.php.
(B) When the request returns to the Browser, a Javascript function will unwrap the answer and place it into the Text Box.

When you are ready to continue let me know.

Knowledge is that which can be shown to be the case, and Intelligence is the method one uses to deploy the demonstration of what is the case, everything else is Information.

Fantastic!! Code works perfectly...
Now if you were so kind, I would appreciate it if you could show me how to do it when the combo is filled with data from a database. The table is simple, it has two fields: code of country (P_codprocedencia) and Name of country (P_procedencia):