ALL

Javascript, PHP, Ruby functionsI assume you are very
familiar with declaring functions in any of the languages above, if not,
you should not be reading this. Let’s begin with a simple function to
send email in these languages:// PHP or Javascript
do_send_email (recipient, cc, subject, body);
// Ruby
do_send_email (recipient, cc, subject, body)So
it’s clear by looking at the function’s signature that it takes 4
parameters and they could be optional, depends on your implementation.
Eve...

I’ve been smashing my head against this all day – but I finally got something working consistently and reliable, so I better damn well document it. This is as good a place as any, and hopefully it will be useful to others.I needed to make an Ajax call, so I turned to my good friend XMLHttpRequest. One wrinkle was that I needed to pass in a parameter to it… so I tried:var test = "bar";
req = new XMLHttpRequest();
req.open("GET", myURL, true);
req.foo = test;
req.onreadystatechange = functio...