How can i add field editor using java script?

Vivek,

Check out this tutorial about dynamic creation of models, I think it’s exactly what you’re looking for!

Thanks!
Amy