shay
(Shaytrjmn)
1
hi!
after updating from 1.1.2 to 1.1.5 the ajax is ignored.
the page refresh itself when i click it.
CHtml::imageButton(‘images/ShowAns.png’, array(“id”=>rand(),“class”=>“CheckAns”,
'ajax' => array(
'type'=>'POST', //request type
'url'=>'?r=exercise/ShowAns&rand='.rand().'&ansId='.$this->ansId, //url to call
'update'=>'#table'.$this->ansId, //selector to update
'beforeSend' => 'function(){
$("#tableLoad'.$this->ansId.'").addClass("loading");}',
)));
jacmoe
(Jacob Moena)
2
That’s probably due to the jQuery update.
Check the syntax.
Also, try wrapping the script in ‘js’, like this:
onWhatever="js:{your_js}"
shay
(Shaytrjmn)
3
sorry, i didn’t understand what you mean.
but hear a strange thing. it works on Chrome and IE but not on FireFox :\
any idea?
jacmoe
(Jacob Moena)
4
Try using the controller createUrl function for the url.
Like ‘$this->createUrl(whatever, array(parameters));’
I meant to say that the version of jQuery has been updated by Yii 1.1.5.
shay
(Shaytrjmn)
5
nop…it doesn’t work.
the form sent as if i didn’t put the AJAX parameter at all…
sorry about my bad english.