Dynamic Text Boxes

If you’ve got lots of images on one page with a description for each — or even multiple layouts/skins that visitors can choose from that need detailing — you probably won’t want long lists of text that the visitor has to scroll through to find the part that applies to them. Instead, why not have […]

Show and Hide Elements with JavaScript

One of the benefits of JavaScript is that it can be easily used to manipulate elements on a page without having to refresh or fiddle with complex server-side languages. For example, imagine you have a page of frequently asked questions — you won’t necessarily want all of these to appear at once, so we can […]

PHPFanBase JavaScript Spam Protection

Note: PHPFanBase is an old script with known security issues. Use with caution. This tutorial will show you how to implement basic JavaScript protection to deter automated spam bots from filling in fake applications at your PHPFanBase-powered fanlisting. Open join.php and find the following line (and fix the typo “Subtmit”; this should be “Submit”): <td><input […]

Enth3 JavaScript Spam Protection

Open show_join.php and near the bottom, find this: <input type="submit" value="Join the <?php echo $info[‘listingtype’]; ?>" class="enth3_submit" /> ..just before it, add: <script type="text/javascript"> <!– document.write(‘<input type="hidden" name="spamproofing" id="spamproofing" value="SPAMWORD" />’); //–> </script> <noscript><div>JavaScript must be enabled to join due to spam restrictions in place.</div></noscript> At the top of the file, after this: if( isset( […]