Hi all! cld u pls tell me as to how to add on dyanmically textboxes whgen a user cliclk on a button.. i tried with document.write("Input type="...) it went to a new documnet ... pls help me out... Menon
If you want some parts of your form to appear only if user hits the button, you might want to instead of creating them dinamicly, just play with "visisbility" attribute.
If you have a situation, when you need different elements appear at the same place, depending on what is clicked on a page, you can define hidden div's one for each set of elements, and then just use their innerHTML (or just use cloneNode and appendChild) to be included into right place on your page. The following is very simple example of that. I tested it in IE, but it could be cross browser.