Only use hide(), show(), block(), etc. if you want an "ordinary"
htmlpage to be shown. If you on the other hand want the values of form
elements to change you should do something like this:

<SCRIPT LANGUAGE="javascript">
function fillForm(){
        document.form_name.txt.value = document.form_name.a_selection.value;

<FORM NAME="form_name" METHOD... ACTION....>
<SELECT NAME="a_selection" onChange="fillForm();">
  <OPTION VALUE="pickup">Pick up
  <OPTION VALUE="Goto">Go to
<INPUT TYPE="text" NAME="txt" VALUE="">

AB> I want to create a form which once you select a radio button or a drop down
AB> menu display the proper fields according to the selection.

AB> Let say that we have two options : To go and Pick Up. If the user select to
AB> go then automatically display the address field, zip field etc, if the user
AB> select pick up display the time field etc.


Kind regards,
    Morten Winkler

PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to