Yii renderpartial (proccessoutput = true) Avoid Duplicate js request

后端 未结 3 1333
北恋
北恋 2020-12-05 06:13

Im creating a site who works with ajaxRequest, when I click a link, it will load using ajaxRequest. When I load for example user/login UserController actionLogin, I <

3条回答
  •  独厮守ぢ
    2020-12-05 06:43

    To avoid including script files twice, try this extension: http://www.yiiframework.com/extension/nlsclientscript/

    To avoid attaching event handlers twice, see Jons answer: https://stackoverflow.com/a/10188538/729324

提交回复
热议问题