Click to See Complete Forum and Search --> : dynamically expanding a page


vhrao
October 2nd, 2004, 10:26 AM
I have aspx page with select control. Whenever user selects a choice, I want to add new controls below the select control on the same page. If user selects differrent choices, I want to add different controls to the same page. Can someone give me a javascript example and tell me how to do this.

Many thanks

PallaviDalvi
October 4th, 2004, 05:05 AM
a simple example

document.body.insertAdjacentHTML("beforeEnd","<input type=text>");

or

var ele=document.createElement("input");
document.body.appendChild(ele);

the above add an inputbox...ofcourse u can add any element in this fashion. Hope that helps u