Standard way to "log" user's choice on a web page
<p>I have a web page with a tiny space for users to submit some comments. 
just one line of text and a button. 
if they use it, after pressing the button I have a bit of javascript which disables the button and thanks them. </p>

<p>The next bit is how to send their comment to the server. </p>

<p>The way I have done it is the following: </p>

<p>in the javascript which handles the 'submit' I create a new javascript like this:</p>

<pre><code>var script = document.createElement('script');
script.src = 'usercomment.js?'+commentValue;
document.body.appendChild(script); 
</code></pre>

<p>I don't have any usercomment.js script so the call fails silently.
However the advantage is that I get a call to the server which is logged and then I can read all of the comments.</p>

<p>I am happy with this solution but I was wondering if there is a better way to achieve the same thing. Somehow it seems quite convoluted and a bit of hack.</p>

<p>so my question is what's the standard way to record something as simple as an action from the browser to the server ? </p>

<p>p.s.
I am not allowed to modify the server side. So I can only rely on its logs to retrieve this type of information.</p>

<p>p.s. 
please don't suggest an event in google analytics that would be breaching their legals. </p>
