0

When i was playing around with <iframe> I noticed that it only works on specific browsers but if you view the site without the iframe, it works fine on the browser. Why is that happening? Does each browser have their own specifications or something?

I was playing around in a Moodle CMS, if you are wondering

3
Contributors
13
Replies
38
Views
4 Years
Discussion Span
Last Post by <M/>
0

In each instance when you had this problem, did you view the page's source using the browser to make sure the iframe element was actually there?

In what browser(s) did this not work in?

0

I don't recall checking on the page's source. I will check that though even though i am certain it is there because it shows up in the editor when i try to edit the page.

Also, the iframe was not working on Firefox (both mac and windows) and Internet explorer but the actual site was working.

0

It is but you would be required to be a member of the school using moodle (don't ask how i got it) :(

0

When i was playing around with <iframe> I noticed that it only works on specific browsers but if you view the site without the iframe, it works fine on the browser.

@Micheal

Sorry for replying so late.

iframes usually works for all browsers. It's what inside the iframe might not display. What data are you trying to display. It has be appropriate.

@JorgeM

Congratulation for becoming a Moderator! Didn't notice til now. I been away for a while. Keep up the good work, Dani should give you a bonus. Just lecture Micheal.

0

iframes usually works for all browsers. It's what inside the iframe might not display. What data are you trying to display. It has be appropriate.

I am trying to display a webpage, the problem is that the webpage displays properly by itself on all browsers but doesn't display on most browsers when i use iframe.

Dani should give you a bonus. Just lecture Micheal.

... (facepalm)

Edited by <M/>

0

I am trying to display a webpage, the problem is that the webpage displays properly by itself on all browsers but doesn't display on most browsers when i use iframe.

can you post the code of how your iframe pop up? It should be in javascript.

... (facepalm)

I'm pretty out of date. What is a facepalm? I'm getting old.

0

I'm pretty out of date. What is a facepalm? I'm getting old.

Basically it is just your palm to your face... kinda like this: http://www.taylorclark.co/wp-content/uploads/2013/04/picard.jpg :D

can you post the code of how your iframe pop up? It should be in javascript.

All i did was this:

<iframe src="http://mywebsite.com/" width="100%" height="745"></iframe>

Also, i was using a cms called moodle (don't ask how i got it ;)), could the cms have anything to do with the problem?

1

Basically it is just your palm to your face... kinda like this: http://www.taylorclark.co/wp-content/uploads/2013/04/picard.jpg :D

Thanks now I get it!

Try to add this your webpage:

<a href="javascript: openwindow()"><u>iframe</u></a>

This is your javascript:

<script type="text/javascript">
function openwindow(){
    window.open("http://mywebsite.com/iframe", "mywindow", "location=0,status=0,scrollbars=1,width=445,height=425");
} 
</script>

when you click on the iframe link, that will display the location of the iframe from the using that javascript. Then will display the data from the iframe.

Does that make sense?

I have to go now.

Edited by LastMitch

0

Oh ok, i see now. One last question, should i apply that snippet to my webpage (index.php) or to the cms (moodle editor) i am using to display the page?

0

Ok... i tried testing the code, so far it isn't working successfully :( It doesn't do anything. Am i missing something?

0

Ok... i tried testing the code, so far it isn't working successfully :( It doesn't do anything. Am i missing something?

My bad. Sorry about that. I forgot to add the extension in the javascript. The file should be iframe.html. You have to put the iframe.html either in a folder on your server or just put it where you can link it.

<a href="javascript: openwindow()"><u>iframe</u></a>

This is your javascript:

<script type="text/javascript">
function openwindow(){
window.open("http://mywebsite.com/iframe.html", "mywindow", "location=0,status=0,scrollbars=1,width=445,height=425");
}
</script>

Does that make sense?

0

i am playing around with the snippet and i still don't see any success. what did i forget to do?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.