Click to See Complete Forum and Search --> : extreme cookies


slimshady
05-30-2003, 05:22 AM
ive got 18 forms and they are all nameless.. every form has 5 input fields.
i want all text that is entered in every nameless form to be saved in a cookie when the page closes
how do i do it..
any help is greatly appreiciated
thnx
greetingzzz tha real slimshady

Charles
05-30-2003, 05:49 AM
It will not work for the 13% of users who do not use JavaScript and the countless numbers of users who do not use cookies, but if this is just fluff then try:

for (j=0; j<document.forms.length; j++) {for (k=0; k<document.forms[j].elements.length; k++) {document.cookie = ['form', j, '_', 'element', k, '=', document.forms[j].elements[k].value].join('')}}