I have a question, Im using jquery, jqueryui and basic ajax.
I would like to use some plugin or easy way to refresh the result of a form without refrehs the page.
For example if I search hotels and I want filter only the 3 starts ones that the result load in the same page without refresh
Thanks!!
This is the slider jquery code:
$(function() {
$( "#slider-range-min" ).slider({
range: "min",
value: 50000,
min: 1,
max: 50000,
slide: function( event, ui ) {
$( "#amount" ).val(ui.value+ " €" );
}
});
$( "#amount" ).val($( "#slider-range-min" ).slider( "value" )+ " €" );
});
If you are interested in some framework, Yii provides some great widgets with behaviour that you are interested in (and many more).
Read more here: http://www.yiiframework.com/ and here: http://www.larryullman.com/2009/10/31/getting-started-with-the-yii-framework/
If you don’t want a framework, I guess it can be done with jquery and ajax quite easily, but you should share some html code.
Code:
`$.post(‘current url’, $(formSelector).serialize(), function(data) {
var table = $.xmlDOM( data ).find(tableSelector).html();
$(tableSelector).html(table);
}`
It’s not very clean and effective approach but it should do the trick (and Yii does it the same way :D)