Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Submitting Ajax POST with PlayFramework 2.x and the Javascript Router
...
_nS('controllers.admin.Products'); _root.controllers.admin.Products.search =
function() {
return _wA({method:"POST", url:"/" + "admin/product/search"})
}
...
...
@helper.javascriptRouter("jsRoutes")(
controllers.admin.routes.javascript.Products.search
)
jsRoutes.controllers.admin.Products.search().ajax({
data: $("#product-search-form").serialize(),
success: function(data) {
$("#results").html(data);
}
});
POST /admin/product/search controllers.admin.Products.search()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment