How To Generate A Sequential Number Series Using Java Script Or Jsp Like1 ,2, 3, 4,?

A text box needs to have a value of 1,2, 3,4 automatically…….. Every time the text box is called it should have the previous value incremented by one. How to do this? I am able to do this for a particular session. However when I log out and log in again the text box value becomes 1 again (initialized to 1). Please help. Thanks in advance.

One Response to “How To Generate A Sequential Number Series Using Java Script Or Jsp Like1 ,2, 3, 4,?”

  • Raja says:

    In JSP
    ————–
    use cookie or session variable and store the variable count. once the user logged out the session, clear cookie or session variable. My choice is cookie, because sometimes session don’t working depending on the web server.
    In Javascript
    —————————
    using cookie and save the increment value. Javascript contain only one option, there are no session variable available in javascript

Leave a Reply