Seem like your doing ajax form. I just finish creating my own ajax
form sample and it is really easy and simple to implement, but you are
using other JavaScript libraries to process your form which I don't
know about and recommend. In my opinion, using only "jquery.js" is all
you need to perform ajax. You need take a few steps backward and start
over using just "jquery.js".

Ajax Form References:
http://remysharp.com/2007/03/05/jquery-ajaxed-forms/
http://trevordavis.net/blog/tutorial/ajax-forms-with-jquery/

Here is my sample ajax form (click on PHP request, don't use ASP.NET
because it uses localhost):
http://www.williamchang.org/jquery/

Sincerely,
William Chang
http://www.creativecrew.org
http://www.diehard.cc

On Apr 26, 8:47 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi Karl, thanks for the link ;)
>
> i made a few steps with livequery, but it still doesnt work.
> below is a code snippet i made. and all i want is: the data should be
> sent via the form in the html (over ajaxForm or ajaxSubmit in the
> end), and its repsonse should be written to the DIV #cont.
>
> the index.html:
> <script type="text/javascript" src="../jquery.js"></script>
> <script type="text/javascript" src="../jquery.form.js"></script>
> <script type="text/javascript" src="../jquery.livequery.js"></script>
> <script type="text/javascript">
>     $(document).ready(function() {
>         $('form').livequery('submit', function() {
>             alert('submit button pressed');
>             var options = { target: "#cont" }
>             $(this).ajaxForm(options);
>         });
>         return false;
>     });
> </script>
> </head>
> <body>
>         <div id='cont'></div>
>         <div id='search'><div>
>         <script>
>             $('#search').load('form.html');
>         </script>
> </body>
>
> form.html :
>
> <form action="/my/servlet" name="formi">
>     <input type="hidden" name="command" value="Search">
>     Query: <input type="text" name="query" size=35 value=""/>
>     <input type="submit" value="Go ..."/>
>     </ul>
> </form>
>
> thats it.
> if i press submit, i get the alert, it shows the response form the
> servlet,  but it doesnt use the target at all...
> to me, it looks like it recognizes the click, but the rest is still
> done by a normal html-submit, and not ajax.
> is that possible ? i ve been searching for hours and i thought it
> would be easy, but i did not find a solution...
>
> Any help would be great
>
> Adrian

Reply via email to