Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iframe not displayed #27

Open
kgashok opened this issue Jul 10, 2018 · 2 comments
Open

iframe not displayed #27

kgashok opened this issue Jul 10, 2018 · 2 comments

Comments

@kgashok
Copy link

kgashok commented Jul 10, 2018

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>
@disklosr
Copy link

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)

@kgashok
Copy link
Author

kgashok commented Jul 10, 2018

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants