homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Some suggestions on cookie script

 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)



 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?


 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){
// instead of writing
// doSomethingWith(document.form_name.firstName.value);

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved