§ Don't AJAX an image!
Using AJAX is fine when you need it, but I've used AJAX to simply reload CAPTCHA images. Boy, some people are dumb! Me, in particular.
UPDATE: I'm dumber than I thought...
Referring to the code below, why waste time getting the time? Just do:
function reload_image() { document.getElementById("rndimg").src+=1; }
Instead of AJAX, just change the src of the img tag. This is what I use for CAPTCHA images now.
function reload_image() { var currentTime = new Date() document.getElementById("rndimg").src+=currentTime.getTime(); }
Boy, some people are just dumb. Me, in particular. UPDATE: Say it again...
last edited on May 30th, 2010 at 4:33 PM
Categories
Comments
- Walid on "Adventures with Ubuntu 9.10 on G4 Yikes!" - I am in the same process as you. Although I still dual-boot to Windows for my ganimg leisure. My first contact with Ubuntu was way…
- Slashback on "Simpler adding & removing element classnames" - Actually, the addClassName function does what you want, pretty much the same way you suggest.
- angie on "Simpler adding & removing element classnames" - And what if I want to add a class, but keeping the csseals the element already has?I mean, I have an element with a class, let's name…
- backlinks on "Adjust iframe height to contents" - Definitely helped me.
- Slashback on "Simpler validate form fields are filled in (no additional class names)" - You are welcome!