Simple YII form , I am trying to submit the form when the focus goes out of the text area , my code is as below
$form = $this->beginWidget(
'bootstrap.widgets.TbActiveForm',
array(
'id' => 'horizontalForm',
'type' => 'horizontal',
)
);
echo $form->textAreaRow(
$model,
'Description',
array('class' => 'span12', 'rows' => 5,'id'=>'DescriptionText')
);
$this->endWidget();
Javascript
<script>
$ (document).ready(function()
{
$("#DescriptionText").focusout(function(){
$( "#horizontalForm" ).submit();
var DescriptionTextvalue = $("#DescriptionText").val();
$.post("WHAT SHOULD I PUT HERE", {
Description: DescriptionTextvalue,
},
function(data)
{
// alert(data);
}
);
}
});
});
});
</script>
My Question is : $.post("WHAT SHOULD I PUT HERE")?