I am coding in Yii.

I have registered the main.css file in my main.php layout file like so :

Yii::app()-&gt;clientScript-&gt;registerCssFile($this-&gt;assetsBase.'/css/main.css');


Now this script is being registered in all the pages. However, say I don't want that script to be registered on a specific page.

I know that using : 

Yii::app()-&gt;clientScript-&gt;reset();


would remove all the CSS files, however I want only few CSS files to be unregistered.

Is there a way to do it?


Question: Get an IFRAME element by name does not work anymore?
Answer: New EDIT: That old code worked because of some possible bug (or intended) in the old versions of internet explorer.

From this Beware of id and name attribute mixups when using getElementById in Internet Explorer

When using getElementById to get a reference to an element via the id attribute, Internet Explorer for Windows (and some versions of Opera) will also match an element whose name attribute contains the same value.

First given answer:

You are fetching by id but you didn't set the id in iframe element

window.document.getElementById("frameModalityList")

change name attribute to id iframe to

&lt;iframe id="frameModalityList" src="iframe_advanced_list.jsp" frameborder="0" marginheight="0" marginwidth="0" class="advanced_list" width="100%" height="300"&gt;&lt;/iframe&gt;