JmZ's example using jQuery is probably the best route you can take - it makes everything easier.

Also instead of using the ID's of your input fields, place an ID on each of the td tags the inputs are in, then use the same code. For IE6 however you may have to put a conditional statement in there and use table-row instead of block for display.

If you decide to take the jQuery route, then you should be fine using the input ID's although you will have empty table rows.
AdM.as Reviewed by AdM.as on . Problem using javascript in form field I am looking to show few extra form fields depending on the selection from a drop down menu. For eg. in a drop down asking for payment option if i select Online bank transfer then it should create/show a new form field below it asking for bank account number and name. And, if i select paypal then it should ask for paypal id. I have made this code which is working fine when i dont use form tag.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" Rating: 5