This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes HTML, CSS and JavaScript and the fly likes Generating numbers before dynamically generated text boxes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Generating numbers before dynamically generated text boxes" Watch "Generating numbers before dynamically generated text boxes" New topic
Author

Generating numbers before dynamically generated text boxes

Prasanna Raghavendar
Greenhorn

Joined: Sep 15, 2011
Posts: 19
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

Joined: Apr 19, 2012
Posts: 37
Welcome to JavaRanch Prasanna!!

Why dont you use i to generate question number?

Prasanna Raghavendar
Greenhorn

Joined: Sep 15, 2011
Posts: 19
Thanks.. Got it i was trying different things with portlet factory...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61071
    
  66

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.)


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Generating numbers before dynamically generated text boxes