automatic form textfield

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
alexislalas
Forum Commoner
Posts: 44
Joined: Sun Feb 19, 2006 10:09 pm

automatic form textfield

Post by alexislalas »

i have a menu/list form element with the articles name.
then i have a textfield that is the authors name.


how is it done, that when you select the article the authors name is automatically selected?


thanks
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Javascript
alexislalas
Forum Commoner
Posts: 44
Joined: Sun Feb 19, 2006 10:09 pm

Post by alexislalas »

could you elaborate more, please?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Using the onchange event in the <select> you can have Javascript replace the text in the text field. The information to inject if often stored, in one way or another, inside the value attribute of the option selected.

Have a read through devguru's Javascript articles on what's supported.
Post Reply