Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Generating numbers before dynamically generated text boxes

 
Prasanna Raghavendar
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Here, i want to generate a question number using the loop and it sould appear before each text box like [Question 1: <TextBox> Question 2: <TextBox> Question 3: <TextBox>]. How ow should i do it?


PS: the number of text boxes are dynamically generated depending upon the value of 'n'.

Thanks,
Prasanna
 
Nikhil Padharia
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch Prasanna!!

Why dont you use i to generate question number?

 
Prasanna Raghavendar
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.. Got it i was trying different things with portlet factory...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64858
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to use code tags when posting code to the forums. Unformatted or unindented code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please click this link ⇒ UseCodeTags ⇐ for more information. Properly indented and formatted code greatly increases the probability that your question will get quicker, better answers.

I've gone ahead and added the code tags for you. See how much easier the code is to read? (aside from the wonky indentation that you used.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic