Yii Framework Forum: how to avoid multiple submission - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

how to avoid multiple submission CButtonColumn Rate Topic: -----

#1 User is offline   karthick gunasekaran 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 11-September 14

Posted 09 March 2015 - 06:56 AM

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
0

#2 User is offline   Bizley 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 888
  • Joined: 29-July 14
  • Location:Wrocław

Posted 09 March 2015 - 07:08 AM

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');
    });
});

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users