Javascript for mobile HTML form
<p>I am having some problems with Javascript :(
This is an HTML form for a mobile webpage. To save space I put the names of the text fields inside the boxes. The name disappears when you focus on the box, but I am not able to make it reappear if the user didn't write anything. </p>

<p>Here is the Script (in head tag):</p>

<pre><code>&lt;script type="text/javascript"&gt; resetDefault();{if (this.value.length==0); this.value="default";} &lt;/script&gt;
</code></pre>

<p>Here is the HTML code:</p>

<pre><code>&lt;input onfocus="this.value=''" onblur="resetDefault()" name="nom" type="text" value="Nom complet" default="Nom complet"/&gt;&lt;br&gt;&lt;input onfocus="this.value=''" onblur="resetDefault()"name="courriel" type="text" value="Courriel" default="Courriel"/&gt;&lt;br&gt;   
</code></pre>

<p>I keep getting a "resetDefault is not defined" error. I don't know if default is an accepted attribute for input, but I can't set it to "value" because value becomes 0 once someone has focused on the text field, right?</p>
