• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Dynamically create TextBox array in Javascript.

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Shankar Raj.J", please check your private messages for an important administrative matter.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
reply
    Bookmark Topic Watch Topic
  • New Topic