how do I capture the submit event in this particular scenario( I am using Kohana):?
controller function (swo/test):
echo "Form succesfully submitted.<br/>";
$min = $_POST['price1'];
$max = $_POST['price2'];
echo "Minimum Value:" . $min . "<br/>";
echo "Maximum Value:" . $max;
$q = new Swo_Model;
$result = $q->searchRange($min, $max);
echo Kohana::debug($result);
$view= new View('template');
$view->slider = new View('slider');
$view->content = new View('advsearch');
$view->content->list = $result;
$view->render(TRUE);
HERE IS MY JQUERY SCRIPT
$(document).ready(function()
{
$('#slider').slider({
min:0,
steps: 50,
max:300,
range: true,
change: function(e,ui){
$("#min").text("$" + ui.values[0]);
$("#max").text("$" + ui.values[1]);
$("input[name='price1']").val(ui.values[0]);
$("input[name='price2']").val(ui.values[1]);
$("#advance").trigger("submit");
}
});
});
I have a slider. I slide it to a particular value, then trigger a form submit via jquery. What I want to do is load the output of the testSubmit function to a specific region in my page, without the slider being refreshed. I tried to do it with the submit(function(){}) already but to no avail.