itty-bitty icon indicating copy to clipboard operation
itty-bitty copied to clipboard

iframe not displayed

Open kgashok opened this issue 7 years ago • 2 comments

An iframe does not get displayed. I am using Chrome. What do I have to do? (I've enabled scripting as per https://projectinsight.net/support/kb/chrome-blocks-iframe, and it still does not load).

<h1 id="visual-quiz">Visual Quiz</h1>
<ol>
<li><a href="http://j.mp/badShape">http://j.mp/badShape</a> - what is the value returned by the method <code>calculateVolume()</code>. Is it wrong? How will you fix it?</li>
</ol>
<iframe width="800" height="500" src="http://pythontutor.com/iframe-embed.html#code=public%20class%20SomeShape%20%7B%0A%20%20%20%20private%20int%20height%3B%20%0A%20%20%20%20private%20int%20length%3B%20%0A%20%20%20%20private%20int%20depth%3B%20%0A%20%20%20%20%0A%20%20%20%20public%20SomeShape%20%28int%20height,%20int%20length,%20int%20depth%29%20%7B%0A%20%20%20%20%20%20%20height%20%3D%20height%3B%20%0A%20%20%20%20%20%20%20length%20%3D%20length%3B%0A%20%20%20%20%20%20%20depth%20%3D%20depth%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0A%20%20%20%20public%20int%20calculateVolume%28%29%20%7B%20%0A%20%20%20%20%20%20return%20height%20*%20length%20*%20depth%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20public%20static%20void%20main%28String%5B%5D%20args%29%20%7B%0A%20%20%20%20%20%20SomeShape%20s%20%3D%20new%20SomeShape%20%281,%202,%203%29%3B%20%0A%20%20%20%20%20%20int%20volume%20%3D%20s.calculateVolume%28%29%3B%0A%20%20%20%20%20%20System.out.println%28%22Volume%3A%20%22%20%2B%20volume%29%3B%20%0A%20%20%20%20%7D%0A%7D&amp;codeDivHeight=400&amp;codeDivWidth=350&amp;cumulative=false&amp;curInstr=0&amp;heapPrimitives=nevernest&amp;origin=opt-frontend.js&amp;py=java&amp;rawInputLstJSON=%5B%5D&amp;textReferences=false"> </iframe>
<ol start="2">
<li>
<p><a href="http://j.mp/thisScope">http://j.mp/thisScope</a>  - What is the compile error you notice in red? Please explain why.</p>
</li>
<li>
<p><a href="http://j.mp/thisFinal">http://j.mp/thisFinal</a>  - What is the compile error you notice in the red? Please explain why.</p>
</li>
</ol>
<h2 id="usage-of-java-this-keyword">Usage of java this keyword</h2>
<p><a href="http://j.mp/thisJavaPoint">http://j.mp/thisJavaPoint</a></p>
<p>Here is given the 6 usage of java this keyword.</p>
<ol>
<li><code>this</code> can be used to refer current class instance variable.</li>
<li><code>this</code> can be used to invoke current class method (implicitly)</li>
<li><code>this()</code> can be used to invoke current class constructor.</li>
<li><code>this</code> can be passed as an argument in the method call.</li>
<li><code>this</code> can be passed as argument in the constructor call.</li>
<li><code>this</code> can be used to return the current class instance from the method.</li>
</ol>

kgashok avatar Jul 10 '18 02:07 kgashok

Had this same issue yesterday. I suggest you check console output and see what error you're getting but I think (as you mentioned in your link) it has to do with the fact that you can't load an unsafe content (http) inside a safe one (https). Now you might try to load safe content inside safe content but that might also not work because some sites simply don't allow it (try google.com)

disklosr avatar Jul 10 '18 06:07 disklosr

I changed src="http://pythontutor.com... to src="https://pythontutor.com

There was no error in the console output. However, the link did not load up either; is it because pythontutor.com is unable to load in safe mode?

kgashok avatar Jul 10 '18 17:07 kgashok