I have this very old JS that worked in IE8 that was doing this:

window.document.getElementById("frameModalityList")


Here is what I want to fetch:

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


Now, when I try it in IE9/10, Chrome, I get an error:


  SCRIPT5007: Caught exception occurred : Unable to get property 'contentWindow' of undefined or null reference 


What is the new proper way to get the IFRAME element?


Question: display tag and c choose tag
Answer: I guess that the variable pCount = null. Try to check ${not empty pCount and pCount&gt;0}.