aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes auto-increment no.(sequential no.) in javascript? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "auto-increment no.(sequential no.) in javascript?" Watch "auto-increment no.(sequential no.) in javascript?" New topic
Author

auto-increment no.(sequential no.) in javascript?

Vinod Vinu
Ranch Hand

Joined: Aug 30, 2009
Posts: 217
how to create a auto-increment no. through javascript?


Vinod Kumar Nair
"Any fool can write code that a computer can understan. Good programmers write code that humans can understand."
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You add one to it?

What is your real question here? You are missing some details on why you are asking this.

Eric
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What's an auto-incrementing value, anyway? Nothing happens by magic.

Except alpacacorns, the unique hybrid offspring of unicorns and alpacas.
Vinod Vinu
Ranch Hand

Joined: Aug 30, 2009
Posts: 217
What's an auto-incrementing value, anyway? Nothing happens by magic.


I have a dhtml grid with a button(add row) below to it. on click of add row button , there is column, on that column the count should come in a sequential order.
i tried by using javascript but got stucked in an endless loop like:-


Iam trying to put the value of 'i' on that column. I know i have not given any 'conditional' in the for loop thats i got endless loop.

is there any other way to do that ? or does dhtml provides some other way to do that like count of row Index, etc like that?

thanks in advance
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Well, you know how many rows you're starting off with, and you know that each time you click to add a row you need to increment a counter--I guess I'm not sure what the problem actually is.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Why would you need a for loop to increment a variable each time a button is clicked?



Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: auto-increment no.(sequential no.) in javascript?
 
Similar Threads
Auto_Increment Primary Key
@Generatedvalue and MySQL
is it a must to have id for each mapping file ?
Entity Bean on JBoss4.0.2
autoincrement invoice