JS/PHP: Who is responsible for generating the content?
<p>Here's a situation which I have encountered, creating a form on the client side and using PHP to process. Here are some considerations</p>

<ol>
<li>The PHP script generates the form and send to the client side. This is because of internationalization issues</li>
<li>The client side uses JavaScript to submit form; the ID of the form is hard-coded inside the JavaScript as it is generated by PHP. This means everytime the PHP code is updated, the JS must change.</li>
</ol>

<p>The question here is, who should be dependent on who? Should the JS generate the form instead, so that the PHP script has to know the names of the form elements? OR should it be the other way round?</p>
