| js Some suggestions on cookie script |
Birdman

msg:1481346 | 12:00 am on Jul 25, 2002 (gmt 0) | Once again, thanks to all of the helpful people here. I will due my duty in the future, when I know enough to answer. Anyway, I'm writing my first cookie script and I'm not that great at JS but I have a decent understanding, I think. question1 = sending_info_from_form(arguments, or_document.form.name)
|
Birdman

msg:1481347 | 12:13 am on Jul 25, 2002 (gmt 0) | Ok, that was pretty stupid. But seriously, if I'm using a form, should I send the info(from body to function) using arguments or should I get the info by using document.form_name.input_name.value?
|
rewboss

msg:1481348 | 7:44 am on Jul 25, 2002 (gmt 0) | To save typing, use the this keyword. If the <form> tag looks like this: <form onsubmit="return process(this);"> then the entire form will be passed to the function, which would look like this: function process(f){ doSomethingWith(f.firstName.value); // instead of writing // doSomethingWith(document.form_name.firstName.value); }
|
|
|