Generating element IDs with JavaScript and counters

The code that I posted in my previous post on creating a unique ID in JavaScript is fairly similar to code that's all over the internet and seemed like it should work. And to be fair, it did work, although with one major problem. If the code runs too quickly it's possible for two elements [...]

How to generate a unique id in JavaScript

PHP makes it pretty easy to generate a unique it with the uniqid() command. JavaScript doesn't have that command, but using the getTime() function of the Date object we can do almost the same thing. PLAIN TEXT JavaScript: function uniqid()     {     var newDate = new Date;     return newDate.getTime();   [...]

XML Parsing Error: junk after document element

Since I had to go through about 20 pages to find the cause of this error, I figured I'd throw up one more with the cause that I found. Hopefully it'll help somebody spend less time debugging the problem than I had to spend. I've got a PHP script outputting XML that's called from an [...]

PDF Manual for Script.aculo.us

Since the Script.aculo.us wiki seems to be down at the moment, and I don't have enough experience with it to code it without the manual, I went out searching for a PDF manual. They're a touch outdated, but I found a site that has a PDF manual and for script.aculo.us available for downloads. There's a [...]

Using $_GET and $_POST together

I find myself writing PHP scripts to do backend Ajax work.  One of the problems I often come up against is that I need to be able to call the same script either using a query string and pulling the variables from $_GET or via a form and calling the variables from $_POST.  I usually [...]