Yii Framework Forum: dialog gridview ajax 提交问题 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

dialog gridview ajax 提交问题 Rate Topic: -----

#1 User is offline   johocn 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 42
  • Joined: 21-January 10

Posted 19 February 2012 - 06:12 AM

我是在一个新的dialog打开gridview 并使用ajax获取参数时,第一次打开是正常值,第二次再打开就会出、发现参数被传了两次,关闭dialog要两次才能关闭,因为打开了两个窗口。有哪位朋友完美的解决了,dialog gridview ajax 请给个代码谢谢。
0

#2 User is offline   king-zhou 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 05-May 11

Posted 22 February 2012 - 05:29 AM

应该是你的js被执行了2次。之前在其他地方碰到过。试试在js加个die()方法。这个和yii无关。
$(":input").die().live('click',function(){
//过程
});
0

#3 User is offline   hehbhehb 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 50
  • Joined: 24-February 12

Posted 26 February 2012 - 05:33 AM

yii1.1.9中在CHtml中有个live参数,将其设为false即可, 如
echo CHtml::submitButton(Yii::t('tool','CANCEL'), array('id'=>'cancel','onclick'=>$onclick,'live'=>false));

yii 技术交流群QQ:215544045
0

#4 User is offline   johocn 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 42
  • Joined: 21-January 10

Posted 15 December 2012 - 08:25 AM

谁有上述问题好用的代码给一个
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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