JQuery not woking
<p>My JQuery does not fire up the sanitize function.I need to take the value from the input field name , sanitize it (with santize function) and display it in path input field. Why isn't it working ? I use PHP 5.3 and HEIDISQL</p>

<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
    &lt;?php 

    include('conect.php');
    if(($_POST)&amp;&amp;(!empty($_POST['name']))&amp;&amp;(!empty($_POST['path'])) ){
    $name=$_POST['name'];
    $path=$_POST['path'];

    function sanitize($title) {
        $title = strip_tags($title);
        // Preserve escaped octets.
        $title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title);
        // Remove percent signs that are not part of an octet.
        $title = str_replace('%', '', $title);
        // Restore octets.
        $title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title);

        if (seems_utf8($title)) {
            if (function_exists('mb_strtolower')) {
                $title = mb_strtolower($title, 'UTF-8');
            }
            $title = utf8_uri_encode($title, 200);
        }

        $title = strtolower($title);
        $title = preg_replace('/&amp;.+?;/', '', $title); // kill entities
        $title = str_replace('.', '-', $title);
        $title = preg_replace('/[^%a-z0-9 _-]/', '', $title);
        $title = preg_replace('/\s+/', '-', $title);
        $title = preg_replace('|-+|', '-', $title);
        $title = trim($title, '-');

        return $title;
    }   

    mysql_query("UPDATE menus SET name='$name' , path='$path'");
    }

    ?&gt;
    &lt;html&gt;
    &lt;head&gt;

    &lt;script&gt;


$(document).ready(
function(){
          $("#name").change(function(){
             $("#path").sanitize("name").val();             

          });
} );


&lt;/script&gt;

    &lt;/head&gt;

    &lt;body&gt;
            &lt;form action="&lt;?php $_PHP_SELF ?&gt;" method="post"&gt;
            &lt;label for="nume"&gt;Name&lt;/label&gt;&lt;input type="text" name="name" /&gt;
            &lt;label for="cale"&gt;Path&lt;/label&gt;&lt;input type="text" name="path" /&gt;
            &lt;input type="submit" name="submit"/&gt;
    &lt;/form&gt;
    &lt;/body&gt;
    &lt;/html&gt;
</code></pre>
