This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

displaying multiple rows based on textbox value

 
Yell Srik
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I need to acheive the following functionality:

In my HTML form,


Now my requirement is that when the user enters value in the textbox as 1-5 and clicks on the submit button my output should be:

Value1
Value2
value3
value4
value5

if the user enters 1,5 in the textbox the output should be:

value 1
value 5

Can anyone give me an idea on how to implement this functionality in javascript? Thanks in advance
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will have to use something like indexOf or split() and also createRow();

Eric
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic