Note that there are some explanatory texts on larger screens.

plurals
  1. POGet content from iFrame, where is the error?
    primarykey
    data
    text
    <p>I'd like to get the security zone (Internet zone / local intranet) for a number of URL's which are in the same domain. I thought the best solution would be to get this through iFrame. @Teemu. Code works now. Thank you very much. But one problem so far: It displays the wrong text. Although the page is in trusted zone (local intranet) he displays "untrusted" (Internet zone). Any idea why?</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script type="text/javascript"&gt; function getZone() { var text = new Array(); document.getElementsByClass('iframeNames'); var test; for (var i = 0; i &lt; document.frames.length; i++) { try { test = document.frame[i].contentWindow.document; text[i] = "Trusted (Local Intranet)"; } catch (e) { text[i] = "Untrusted (Internet Zone)"; } } //end-for var showText = getElementsByClass("zone"); for (var i = 0; i &lt; showText.length; i++) { setText(showText[i], text[i]); }; } //end getZone() function setText(showText, text) { showText.innerHTML = text; } //end setText if (document.getElementsByClassName) { getElementsByClass = function (classList, node) { return (node || document).getElementsByClassName(classList); }; } &lt;/script&gt; &lt;/head&gt; &lt;style type="text/css"&gt; tr:nth-child(2n) { background-color: #ddd; } .format { background-color: #ffff;} #formatierung { margin-left: 10px; margin-top: 30px; font-family: Arial; font-size: 13px; } &lt;/style&gt; &lt;body&gt; &lt;iframe src = "http://example.com" class = "iframeNames" width = "0" height ="0"&gt;&lt;/iframe&gt; &lt;iframe src = "http://example.com/index/" class = "iframeNames" width = "0" height = "0"&gt;&lt;/iframe&gt; &lt;script type = "text/javascript"&gt; window.onload = function() { getZone(); }; &lt;/script&gt; &lt;div id = "formatierung"&gt; &lt;table width = "100%"&gt; &lt;tr class = "format"&gt;&lt;td&gt;&lt;h2&gt;System&lt;/h2&gt;&lt;/td&gt;&lt;td&gt;&lt;h2&gt;Check Security-Zone&lt;/h2&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;example1&lt;/td&gt;&lt;td class = "zone"&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;example2&lt;/td&gt;&lt;td class = "zone"&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload