Unable To Delete A Record With Yii Crud

Hi Experts,

I have generated crud using gii and when i’m trying to delete a record its not happening… anyone any idea pls…

this is the delete menu code generated by yii’s gii


array('label'=>'Delete Record', 'url'=>'#', 

'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),

'confirm'=>'Are you sure you want to delete this item?')),

Many Thanks

Are you getting an error of any kind?

nothing…its just staying in view itself :(. its not even firing or coming up any message

Is the deletion confirmation message appearing?

no nothing happening keith…its just staying in view page…except #coming up in end of the url…what could be the reason??

Use firebug or tamper data to check if your request sent

also try to delete this line in your controller :

public function filters()


{


	return array(


		'accessControl', // perform access control for CRUD operations

////// ‘postOnly + delete’, // delete this line

}

let me know what happened with you

thanks for your response samilo,

request is not going… and just # appearing in url at the end.

now, I found some jquery script is blocking it to fire which i have written a week ago. how can i solve this now …

1- check your browser if Javascript was disabled

2- Add your controller code to check your delete problem

Solved

this was the javascript error “Uncaught TypeError: Object [object Object] has no method ‘apply’” stopped me to delete it by showing dialogue box…

http://stackoverflow.com/questions/11032659/uncaught-typeerror-object-object-object-has-no-method-apply

i’ve solved this by wrapping my function with function(){}.

as described in the link above. Its working fine now…

.hover(function(){ … });

now i’m getting this “javascript uncaught syntaxerror unexpected token” error after wrapping function with function(){}

trying to solve this error in order to prevent any this kind of problem in future.

but my problem solved :)

Thanks everyone :)