On 12 Okt., 22:18, ogurec <[EMAIL PROTECTED]> wrote:
> Hi,
> i use history remote plugin and i try to make it work
> when i send request from search form.
>
> I tried this approach:
>
> $('#search_form').submit
>      (
>         function()
>         {
>             var aurl = this.action;
>             var adata=$(':input',this).serialize();
>             $.ajax (
>                {
>                   type:'GET', url:aurl+'?'+adata, dataType:'html',
> success:function(x)
>                      {
>                         $.ajaxHistory.update('#' + aurl);
>                      }
>                 }
>             );
>         }
>     );
> But with no success. Maybу someone can point me into right direction...

Simply adding to history like that is not supported yet. You need to
attach the form submit to a click event and history enable that link,
try (you must not forget to initialize history as well):

$('a#submit-form').history(function() {
    // ajax submit...
});
$.ajaxHistory.initialize();

with a link like:

<a id="submit-form" href="#submit">Submit</a>


--Klaus

Reply via email to