Which PHP-template to load depends on javascript support
<p>I have the following scenario:</p>

<p>A multiple step registration procedure. Let's say it's 4 steps, and each step depends on previous input. This could be solved with or without Javascript.</p>

<p>Without JS: A "proceed"-button is attached to each step
With JS: The next part is automatically revealed to the user when previous step is done. (No "proceed"-button exists.</p>

<p>The problem is: How do my template engine know which one to present? With or without proceed buttons? You can not just try to test a JS-block of code to determine if it is enabled before PHP loads the template.</p>

<p>One way I've worked out is the possibility that the initial load of the visit sends an ajax-request to a file on the server which only purpose is to set $_SESSION['JS_ENABLED'] = 1 or something like that.</p>

<p>I don't like this. The HTTP request for that file might very well fail leaving the site in belief that the visitor has JS disabled.</p>

<p>I think I need a new approach. Please enlighten me =)</p>
