Join the Mozilla’s Test Days event from Dec 2–8 to test the new Firefox address bar on Firefox Beta 134 and get a chance to win Mozilla swag vouchers! 🎁

Questo sito potrebbe offrire funzionalità limitate durante le operazioni di manutenzione per migliorare l'esperienza utente. Se un articolo non risolve il tuo problema e vuoi richiedere supporto, la nostra comunità di supporto è pronta ad aiutarti tramite @FirefoxSupport su Twitter e /r/firefox su Reddit.

Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Ulteriori informazioni

Questa discussione è archiviata. Inserire una nuova richiesta se occorre aiuto.

Embedded web pages won't display my java scripting on a certain site, but works fine when I view it from the server. How can I fix this so anyone can see it?

  • 32 risposte
  • 2 hanno questo problema
  • 4 visualizzazioni
  • Ultima risposta di cor-el

more options

I have created a couple of small pages that i have embedded into another web site. The embedded pages wont display on that site in FireFox but works on Chrome with no problem. How can I fix this so others on FireFox can view these embedded pages? I didn't know it couldn't be displayed until tonight and I have been looking for a fix since I was told. Some may see a solid white box and others see a grey box with a plugin is needed to view this content. However, if I view the pages I created on the server they work fine in FireFox. Just not when embedded into another web site. I'm stumped...

I have created a couple of small pages that i have embedded into another web site. The embedded pages wont display on that site in FireFox but works on Chrome with no problem. How can I fix this so others on FireFox can view these embedded pages? I didn't know it couldn't be displayed until tonight and I have been looking for a fix since I was told. Some may see a solid white box and others see a grey box with a plugin is needed to view this content. However, if I view the pages I created on the server they work fine in FireFox. Just not when embedded into another web site. I'm stumped...

Tutte le risposte (20)

more options

Please post a public link to your page(s), and describe what should happen.

more options

Hi Fred,

Thanx for the reply. The web site I have them posted on or into is an adult site more or less. it's not a porn site or anything like that but it does have some explicit content. It's called Fubar. If that tells you anything. Just not sure it's appropriate to post the link on here?

FredMcD said

Please post a public link to your page(s), and describe what should happen.
more options

To the left of this post are my stats. My name is a link. Use it to send me a private message.

more options

I got your link. http://fubar.com/justjeremy And I found the problem area. The first displays nothing while the second displays "Plugin Needed."

Using Inspect Element, I was able to open these in a new tabs, and they displayed with no problem.

I've called the big guys to help you. Good luck.

more options

Thanx Fred,

I appreciate all the help.

more options

That is a problem with the code on the website. They use an EMBED tag to embed a web page (HTML file) and that doesn't work in Firefox. You can only embed an HTML page via an OBJECT or IFRAME tag.

You can use a bookmarklet to change the embed to an iframe, see:


javascript:(function(){var cE='iframe',eE=document.querySelectorAll('embed');for(i=0;E=eE[i];i++){N=document.createElement(cE);for(j in E.attributes){A=E.attributes[j];if((A.name!=undefined)&&(A.value!=undefined)){N.setAttribute(A.name,A.value)}}E.parentNode.replaceChild(N,E)}})()
more options

cor-el said

That is a problem with the code on the website. They use an EMBED tag to embed a web page (HTML file) and that doesn't work in Firefox. You can only embed an HTML page via an OBJECT or IFRAME tag. You can use a bookmarklet to change the embed to an iframe, see:
javascript:(function(){var cE='iframe',eE=document.querySelectorAll('embed');for(i=0;E=eE[i];i++){N=document.createElement(cE);for(j in E.attributes){A=E.attributes[j];if((A.name!=undefined)&&(A.value!=undefined)){N.setAttribute(A.name,A.value)}}E.parentNode.replaceChild(N,E)}})()

Ok so using this should work if i understand you correctly. I am not that tech savvy and not sure I understand, but I did use this code before using a normal embed code.

<center><object data=WEBSITELINKOFPAGETOSEE width="500" height="700"><embed src=WEBSITELINKOFPAGETOSEE width="500" height="700"></embed></object></center>

I thought the "object" code was a bit bit much for whatever reason and shortened it to..

<center><embed src=http://domania.us/shuckyducky/Fubar/help/achievements width="500" height="700"></embed></center>

So if I use the FULL code I first mentioned above it should work in FF, correct?

more options

Object with the data attribute to specify the content source should work as well, only an <embed> doesn't work to embed an HTML document. You can only use <embed > to embed plugin content

<object data="http://domania.us/shuckyducky/Fubar/help/achievements" width="500" height="700"></object>

data:text/html;charset=utf-8;base64,PG9iamVjdCBkYXRhPSJodHRwOi8vZG9tYW5pYS51cy9zaHVja3lkdWNreS9GdWJhci9oZWxwL2FjaGlldmVtZW50cyIgd2lkdGg9IjUwMCIgaGVpZ2h0PSI3MDAiPjwvb2JqZWN0Pg==

Modificato da cor-el il

more options

Hmmm.. I'm stumped... Using.. <object data="http://domania.us/shuckyducky/Fubar/help/achievements" width="450" height="700"></object> Does not work in either browser. Chrome nor FireFox.

Using..

<center><object data="http://domania.us/shuckyducky/Fubar/help/achievements" width="450" height="700"><embed src="http://domania.us/shuckyducky/Fubar/help/achievements" width="450" height="700"></embed></object></center>

Does work in Chrome but not in FireFox.

Is there something else I am missing or something else I can try?

more options

Is there a reason to use an object or embed instead of an iframe?

Currently the data attribute seems to be missing from the object tag in the page, but if you are actively editing, that might be a transient issue.

more options

jscher2000 said

Is there a reason to use an object or embed instead of an iframe? Currently the data attribute seems to be missing from the object tag in the page, but if you are actively editing, that might be a transient issue.

Currently, this is the coding I have inserted..

<center><object data="http://domania.us/shuckyducky/Fubar/help/achievements" width="450" height="700"><embed src="http://domania.us/shuckyducky/Fubar/help/achievements" width="450" height="700"></embed></object></center> <center><object data="http://domania.us/shuckyducky/Fubar/RC" height=400 width=400><embed src="http://domania.us/shuckyducky/Fubar/RC" width="400" height="400"></embed></object></center>

I'm not sure what you mean by the data attribute is missing? As for using an iframe, I know some places don't allow them.

more options

jscher2000 said

Is there a reason to use an object or embed instead of an iframe? Currently the data attribute seems to be missing from the object tag in the page, but if you are actively editing, that might be a transient issue.

Here's the main reason I can't use an iframe for this.. http://screencast.com/t/CPCCkDr7p

more options

JeremyChristopher74 said

I'm not sure what you mean by the data attribute is missing?

I may be looking at the wrong page. What I see when I use Ctrl+u to view source is (bolding added for posting):

<center><object width="450" height="700"><param name="wmode" value="opaque"><param name="allownetworking" value="internal"><param name="allowscriptaccess" value="Never"><embed src="http://domania.us/shuckyducky/Fubar/help/achievements" width="450" height="700" allowscriptaccess="Never" allownetworking="internal" wmode="opaque"></embed></object></center><br><br><br><center><object height="400" width="400"><param name="wmode" value="opaque"><param name="allownetworking" value="internal"><param name="allowscriptaccess" value="Never"><embed src="http://domania.us/shuckyducky/Fubar/RC" width="400" height="400" allowscriptaccess="Never" allownetworking="internal" wmode="opaque"></embed></object></center>

Some of those parameters look like Flash parameters. ??

more options

As you can see by what I have in the screenshot I don't have that stuff in my coding, so that has to be stuff that Fubar has added after I add in my codes and Save it. All we have is a small box that we can add "some" code to. They do not allow java script coding hence the reason I was attempting to embed the page I made elsewhere.

Any ideas as to how I can get this working in both Chrome and FF? Otherwise, it looks like I may be stuck with the embed only working in Chrome.

more options

Did you try to paste the data URI I posted above in the location/address bar?

If I inspect the current code in the Inspector via Inspect Element then I still see an object without a data attribute that won't work with any browser.

<object height="700" width="450">
<param name="wmode" value="opaque">
<param name="allownetworking" value="internal">
<param name="allowscriptaccess" value="Never">
 <embed src="http://domania.us/shuckyducky/Fubar/help/achievements" allowscriptaccess="Never" allownetworking="internal" wmode="opaque" height="700" width="450">
</object>

You need to include the URL via a data attribute in the object tag and possibly omit the embed if this works in all the browsers.

<object data="http://domania.us/shuckyducky/Fubar/help/achievements" height="700" width="450">
<param name="wmode" value="opaque">
<param name="allownetworking" value="internal">
<param name="allowscriptaccess" value="Never">
</object>

Modificato da cor-el il

more options

Ok.. so here's what we have now.. In Chrome using the code you gave me above I see nothing at all. In FireFox I see the error message. A plugin is needed to view this content.

<object data="http://domania.us/shuckyducky/Fubar/help/achievements" height="700" width="450"> <param name="wmode" value="opaque"> <param name="allownetworking" value="internal"> <param name="allowscriptaccess" value="Never"> </object>

I didn't know what that long URL you gave me was and actually meant to ask you about it. I apparently forgot to ask. I DO see what I am suppose to see in Chrome and FireFox when I paste the long link into the address bar. How can I use that to make it work in both Chrome and FireFox on Fubar?

Now, I'm confused on something else. If using the embed tag doesn't work in FireFox, what makes my music player from Hypster work in both Chrome and FireFox??

As you can see it also uses the embed tag and works just fine in both browsers..

<embed quality="high" style="width:400px; height:450px; visibility:visible; " type="application/x-shockwave-flash" height="400" width="380" pluginspage="http://www.macromedia.com/go/getflashplayer" border="0" src="http://hypster.com/flash_n/player.swf?id=5330855:7099614:1&autoplay=true" FlashVars="color_bg=0x000000&color_songbg=0x000000&color_song_clicked=0x383532&color_btns=0x3DAB1B&color_text=0xCC0000" />

more options

I'm seeing an empty object tag in Firefox instead of achievements. Your code is getting mangled by the site.

The reason the Flash player embed works is that it is a content type Firefox allows in an embed. cor-el mentioned earlier (https://support.mozilla.org/questions/1096769#answer-813199) that text/html, the type associated with web pages, is not allowed in an embed in Firefox.

more options

Ok, let me remind you I am not a tech person and I am still learning and obviously have LOTS to learn yet. So him saying that didn't make much sense to me. Now that you have explained better or maybe I just didn't read it right when he said it before, but I understand now the difference there.. and yes, the site clearly is screwing the code up. And being that they don't allow java they probably would not be willing to fix it so I can embed another page that contains java into their site.

So with that said.. anything else you can recommend that I can try?

Modificato da JeremyChristopher74 il

more options

I don't have any workarounds you haven't already tried. Does it make any difference if you add type="text/html" into your object tag or does the site strip that, too?

<object data="http://domania.us/shuckyducky/Fubar/help/achievements" width="450" height="700" type="text/html"><embed src="http://domania.us/shuckyducky/Fubar/help/achievements" width="450" height="700" type="text/html"></object>

more options

jscher2000 said

I don't have any workarounds you haven't already tried. Does it make any difference if you add type="text/html" into your object tag or does the site strip that, too? <object data="http://domania.us/shuckyducky/Fubar/help/achievements" width="450" height="700" type="text/html"><embed src="http://domania.us/shuckyducky/Fubar/help/achievements" width="450" height="700" type="text/html"></object>

That just created a blank space in Chrome. And in FF it created another plugin error. So at this point it looks like i need to label it as viewable in Chrome only and just give up on FireFox. Personally, I rarely use FF anymore unless I am playing a game. Appreciate your help though guys...

  1. 1
  2. 2