ajax function not opening a page <p>i don't understand why ajax is not working. my code:</p> <pre><code>&lt;script type="text/javascript" src="js/jquery-1.9.1.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; function edit_row(id) { $.ajax({ method:'get', url:'form.php', success:function(data) { $('#form_div').html(data); } }); } </code></pre> <pre><code>&lt;?php echo '&lt;td style='.$style.'&gt;'.$status.'&lt;a href="" title="Edit" onClick=edit_row('.$data['type_id'].')&gt;&lt;img src="images/pencil.png" width="30px" height="30px"&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;'; ?&gt; </code></pre> <p>its not opening form.php onclick what is the problem please help me!!!</p>