Yii Framework Forum

how to avoid multiple submission


(Karthickg) #1

Hi,

I need to avoid multiple submission in CButtonColumn’

options’ => array(

‘class’=> ‘buttonhide’,

),

i added jquery in css folder

$(document).ready( function() {

$(".buttonhide").click(function(event){


 


	$(this).parent().html('');


	e.preventDefault();


});

});

This is working in firefox perfectly but not in other browswer


(Pawel) #2

Try this (without the button removing)




$(document).ready(function(){

    $(document).on('click dblclick', '.buttonhide', function(event){

        if ($(this).data('flag') == 'set') event.preventDefault();

        else $(this).data('flag', 'set');

    });

});