• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how to create a auto-increment no. through javascript?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You add one to it?

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

Eric
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why would you need a for loop to increment a variable each time a button is clicked?



Eric
 
reply
    Bookmark Topic Watch Topic
  • New Topic