File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Dynamically create TextBox array in Javascript. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Dynamically create TextBox array in Javascript." Watch "Dynamically create TextBox array in Javascript." New topic
Author

Dynamically create TextBox array in Javascript.

Shankar Raj
Greenhorn

Joined: Aug 26, 2008
Posts: 4
I have a unique requirement in the following code.
<HTML>
<SCRIPT LANGUAGE="JavaScript">
function decided(){
alert("Hai");
alert (document.forms[0].Decide.value);
}
</SCRIPT>
<FORM>
Decide on input length<INPUT TYPE="text" NAME="Decide">
<INPUT TYPE="button" value= "Decided" on click ="decided()"><BR>
<INPUT TYPE="text" NAME="NewAge">

<INPUT TYPE="submit"><INPUT TYPE="reset">
</FORM>
</HTML>


If the user enters some numeric value in the Decide textbox I need the NewAge textbox to be an array of that size can someone help.


Regards,<br />Shankar Raj.J
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

"Shankar Raj.J", please check your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

You can either use innerHTML, or use the methods of the DOM to create the new elements. The former is easier, but not standard (but works in all major browsers).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamically create TextBox array in Javascript.
 
Similar Threads
HTML elements name
How to set multiple parametes in a form
Form Validation Help Needed Please
passing formname and texboxname in a function as parameter
Create Dynamic Textbox array