Avoid Repeating Of Script Files In Form Opended In Yii Using Yii Diadlogue Box

Hi All,

I am experiencing a problem that my JS files are repeating twice while opening popups having forms using yii dialogue popups.

I had implemented this line

 Yii::app()->clientscript->scriptMap['*.js'] = false;

in my view page.

Then for the first time the issue regarding repeating js files is resolved.But when i fill my form and click submit button to submit my form ,then its not submitting the form because of the code mentioned above.And if i remove the line mentioned above then it will submit my form without any delay.These repeating js files has slow down my popups opening in yii.So if anyone having solution for the same kindly revert back.

Add on i used to check Js repeating files is Page Speed in firefox.



You have to preload all scripts used on page, even in content loaded in dialogs and then reset registered scripts when generating the ajax response (dialog contents).