0

Let's me explain a little. The goal is to save urls in history state when form submitted. Form has get method and remote submit. If I try to get action via attr method it's always be static. But when I submit the form url looks like /job?type=1&category_id=4&tags=foo,bar because it has get method.

So how can I get exactly this url?

Meliborn
  • 6,495
  • 6
  • 34
  • 53

1 Answers1

1

this way you can get what you want.

var url=$('form').attr('action')+'?'+$('form').serialize();
dev.meghraj
  • 8,542
  • 5
  • 38
  • 76