Trouble With AjaxForm plugin

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Trouble With AjaxForm plugin

I was developing some kind of testing AjaxForm plugin with this script. but it did't run in ajax mode but work like normal submit. anyone can tell me what's wrong with this code ?

html code :
                <script type="text/javascript" src="jquery.js"></script>                <script type="text/javascript" src="jquery.form.js"></script>        </head>
<div id="document-content">
        <script type="text/javascript"> $('#FormLink').ajaxForm({ // target identifies the element(s) to update with the server response target: '#document-content', success: function() { $('#document-content').fadeIn('slow'); } }); function getDeleteLink(act,sid) { document.getElementById("act").value = act; document.getElementById("sid").value = sid; document.FormLink.submit(); } </script>       
<form id="FormLink" name="FormLink" action="ajax.php" style="display:none" method="POST">
        <input type="hidden" id="act" name="act" value="" />
        <input type="hidden" id="sid" name="sid" value="" />
<a href="#" onclick="getDeleteLink('deleteuser','1')">Delete

php script

echo "this only test";