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
posted
0
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?
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: 15357
6
posted
0
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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: auto-increment no.(sequential no.) in javascript?