You should change ajaxForm to ajaxSubmit as ajaxForm doesnt submit the
Form for you. It will just prepare the Form and submit it when you
press Submit I think. You can refer to the documentation for more
information.

$(document).ready(function(){

                        $('#formLoad').everyTime(10000, function(i){
                                $(this).ajaxSubmit(function(responseText){
                                                alert("The form has been saved 
" + responseText);
                                        }
                                );
                        });
                });

Daniel.


On Nov 20, 4:10 am, anny <[EMAIL PROTECTED]> wrote:
> Daniel,
>
> Thank you for the reponse.
>
> I tried this , but does not work. Firfox hangs at everyTime
> (1000,.....  Do i need to unclude any jquery files?
> right now i have only 3 files, form.js and jquery.js , timers.js
>
> $(document).ready(function(){
>                         $('#form').everyTime(1000, function(){
>                                $("#form").ajaxForm(function() {
>                                      alert("data has been saved!");
>                                  });
>                         });
>
> });
>
> I also tried this, but form is not submitted. I see that save()
> function is called and   does show alert("end of save"); but form is
> not submitted.
>
> <script type="text/javascript">
>         // wait for the DOM to be loaded
>       $(document).ready(function() {
>              startsave();
>        });
>
>         function startsave()
>         {
>          var  timeout = setTimeout( "save()", 10000 );
>         }
>
>         function save(){
>              $('#form').ajaxForm(function() {
>                  alert("data has been saved!");
>                   startsave();
>              });
>      alert("end of save");
>        }
>
> </script>
>
> Any help will be appreciated.
> Thanks,
> Anny
>
> On Nov 19, 4:05 am, Daniel <[EMAIL PROTECTED]> wrote:
>
> > Hi ,
>
> > you can try jQuery Timers.http://jquery.offput.ca/every/
>
> > I have done a sample:
>
> > javascript;
> > $(document).ready(function(){
> >                         $('#formLoad').everyTime(1000, function(i){
> >                                 $('input[name=q]').val(i);
> >                                 
> > $('#south').load("select.php?q="+$("input[name=q]").val());
> >                         });
>
> > });
>
> > html:
> > <form id="formLoad" name="form" method="get" action="">
> >            <input type="text" name="q" value=""/><br />
> >            <input type="submit" name="submit" value="submit"/>
> > </form>
> > <div id="south"> Load content into this div</div>
>
> > Daniel.
>
> > On Nov 19, 5:53 am, anny <[EMAIL PROTECTED]> wrote:
>
> > > Hi ,
>
> > > I tried ajaxsubmit which works fine. I need to submit the entire form
> > > by POST automatically for every 60 seconds.
>
> > > What is the best way to do it?
>
> > > How do i use ajaxsubmit  to submit form automatically for every 60
> > > seconds.
>
> > > I did search & do see there are auto save plug-in... but not sure
> > > which one to use.
> > > Prefer ajaxsubmit  with autosave feature. Please help.
>
> > > Thanks in advance. Any help will be appreciated.
> > > Anny- Hide quoted text -
>
> > - Show quoted text -

Reply via email to