Javascript and Php (MVC)
<p>i'm creating my own MVC Framework.
I have a basic form in my view </p>

<pre><code>&lt;form action="?" method="post" &gt;
    &lt;input type="hidden" name="envoie" value="envoie" /&gt;
    &lt;?php dico('INSCRIPTION_NOM'); ?&gt;&lt;input id="name" type="text" name="name" /&gt;&lt;br /&gt;
    &lt;?php dico('INSCRIPTION_EMAIL'); ?&gt;&lt;input id="email" type="text" name="email" /&gt;&lt;br /&gt;
    &lt;?php dico('INSCRIPTION_PWD'); ?&gt;&lt;input id="pwd" type="password" name="pwd" /&gt;&lt;br /&gt;
    &lt;input type="button" value="&lt;?php dico('INSCRIPTION_SINSCRIRE'); ?&gt;" onclick="verifForm(document.getElementById('email').value);"/&gt;
&lt;/form&gt;
</code></pre>

<p>when I clock on the button they have a javascript function like that : </p>

<pre><code>function verifForm(email) {
    var url ="?c=Inscription&amp;a=VerifForm&amp;email="+email;
    $.get(url, function(data){
        alert('resultat == '+data);
    });
}
</code></pre>

<p>Inscription was my controllers and VerifForm an method of the controller. email was the value of a input.</p>

<p>The Php function was :</p>

<pre><code>public function actionVerifForm() {
        echo "OK";
}
</code></pre>

<p>When i click on the button i have all the code of the page on my alert but i only want the message "OK".</p>

<p>Thanks for helping me</p>
