Two Laptop Bag*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 60774
    
  65

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]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Generating numbers before dynamically generated text boxes
 
Similar Threads
check number
how to call a struts tag using innerHTML
Generating fields dynamically
text input onblur calls a js function for formatting of the input data
Need Help With Dynamic text box in JSP