File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes dynamically creating a text box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "dynamically creating a text box" Watch "dynamically creating a text box" New topic

dynamically creating a text box

mouli katta

Joined: Jul 25, 2006
Posts: 1
how to create a text box dynamically when i clicked on some image and i want to place that text box just beside that image.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63874

You can create it as part of the page, hide it with CSS and then reveal it at the appropriate time. Or you can truly create it on-the-fly with one of innerHTML or DOM manipulation.

[Asking smart questions] [About Bear] [Books by Bear]
reubin haz
Ranch Hand

Joined: May 12, 2005
Posts: 287
Or you could use an empty <div> with some id, at the moment you wanna show the text box, place them in as the value of <div>.

I agree. Here's the link:
subject: dynamically creating a text box
jQuery in Action, 3rd edition