Where are you expecting the result to go?  You've got a callback function
there but it doesn't do anything:

// bind 'myForm' and provide a simple callback function
$('#myForm').ajaxForm(function() {
    return false;
});

The result is passed into that callback, for example:

$('#myForm').ajaxForm(function(result) {
    alert(result);
});

If you want the plugin to automatically put the result on the page for you
then you need to pass an options argument to ajaxForm and specify a 'target'
option.   More info can be found at the bottom of this page:
http://www.malsup.com/jquery/form/#api

Mike



On Jan 22, 2008 2:07 PM, mike <[EMAIL PROTECTED]> wrote:

>
> The django variable for my result in django template language is
> {{ result }} everywhere I put this on my page, firebug is showing the
> result in console, but it is not appearing on my page, what am I doing
> wrong?
>
> On Jan 22, 12:49 pm, mike <[EMAIL PROTECTED]> wrote:
> > I am trying to use the jquery form plugin with a djano form.  The form
> > works if i use ajax submit, but has to refresh, I am trying to catch
> > the results without refreshing the page. When i put values in the form
> > and submit the page does not show the result but I am using firebug in
> > Firefox to veiw the console result and I can see that it is returning
> > the result.  The result in firebug are below. Sorry if my question is
> > unclear I am new to django and javascript, basically it seems to be
> > working, but no result is showing on my page. What must i do?
> >
> >  Javascript:
> >   <script type="text/javascript">
> >         // wait for the DOM to be loaded
> >         $(document).ready(function() {
> >             // bind 'myForm' and provide a simple callback function
> >             $('#myForm').ajaxForm(function() {
> >                 return false;
> >             });
> >         });
> >     </script>
> >
> > My form:
> > <form id="myForm" action="." method="post">
> >    VPI: <input type="text" name="VPI" />
> >    VCI: <input type="text" name="VCI" />
> >     <input type="submit" value="Submit Comment" />
> > </form>
> >
> > Firebug console results:
> >                          <input type="submit" value="Ping">
> >
> >                         <br><br>
> >
> > result thats not showing  -->                Success rate is 100 percent
> (5/5),
> > round-trip min/avg/max = 8/11/12 ms
>

Reply via email to