Self-Contained Test Page

As mentioned in the FAQ, when trying to figure out the source of a problem, it's frequently useful to create a small, self-contained test page for replicating the problem in isolation. Why? Two reasons: Firstly, about 90% of the time, if you sit down and create a pared-down test case highlighting the problem, you'll figure out what's wrong yourself. Really. Instant help! Secondly, even if you don't find the answer yourself, you end up with a nice contained example other people can look at and help with.

Here's a template you can start with. Note the "TODO" markers.

<!-- TODO: Obviously, change this if you're using a different encoding -->
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<title>Test Page</title>
<script type='text/javascript' src='prototype.js'></script>
<script type='text/javascript'>
document.observe('dom:loaded', function() {

    // TODO: Delete this and the button below if you don't need them
    // for what you're trying to replicate
    $('btnGo').observe('click', btnGo_click);

function btnGo_click() {

    // TODO: The code for the action goes here
<input type='button' id='btnGo' value='Go' >
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License