If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Insert into an array list

I am currently working on a schedule function. I do not have a database. So i am trying to insert the data from the form into an array list. But i do not have any idea on how to insert the data into the array list. Is there any way to do this ? Thanks

Javascript is no substitute for a database. That said, you can easily create an array:

Code:

var a = [];

Then you can insert things into it:

Code:

a.push('Hey There!');

The problem (if you are looking at this as a database) is that after the page is unloaded, a will no longer be defined, and the 'Hey There' that was pushed into it will be lost. On a limited basis, some stuff like this can be preserved in a javascript client side cookie, but those may be disabled or erased easily by users, sometimes inadvertently. This is in contrast to a server side database which can only be altered by the user as you allow.