Crawling and Googling Web and Serving the Appropriate Results.
This blog is an information center to see technologies from my perspective. Also here you will find information on new technologies like AJAX, Web 2.0, RSS, feeds, ASP, JavaScript, CSS, new ventures, startups and interesting websites from India, personal blog, images captured around the World.

Wednesday, July 09, 2008

After many days I was just trying to work with PHP, MySQL and JavaScript yesterday. In one of the page I wanted to add/remove text boxes on demand (or say dynamically) so after much thought and search i found the solution in using JavaScript. Here is the sample of code which I used for my purpose and may also be beneficial for you web developers who wanted to add or remove text boxes dynamically.

It simply uses two functions:addElement(): It first gets the element id where we want to include a new element followed by creation of new element and appending it inside the element.removeElement(): It removes the last added new element.