Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

embed html pages not working

  • 5 odgovori
  • 4 ima ovaj problem
  • 1 view
  • Posljednji odgovor poslao cor-el

more options

Hi!

I am, unfortunately, prohibited from using frames for my project. Object is also not an option. What I am forced to do is strictly use EMBED to render the page content. Below is an example of code where I am having trouble.
<embed src="http://www.ebay.com" width="600px" height="600px"></embed>
I have tried many variants, adding MIME types, domain only, change from src to data, and so forth. This works fine on all other current browsers, with the exception of Mozilla based ones. I think the plugin manager, given a mime type, should default to a frame. Can someone please explain why Mozilla treats this differently and if there is any way to make this work? Thanks!
Hi! I am, unfortunately, prohibited from using frames for my project. Object is also not an option. What I am forced to do is strictly use EMBED to render the page content. Below is an example of code where I am having trouble. <embed src="http://www.ebay.com" width="600px" height="600px"></embed> I have tried many variants, adding MIME types, domain only, change from src to data, and so forth. This works fine on all other current browsers, with the exception of Mozilla based ones. I think the plugin manager, given a mime type, should default to a frame. Can someone please explain why Mozilla treats this differently and if there is any way to make this work? Thanks!

All Replies (5)

more options

I don't think that you can do this in Firefox with an embed.
Using object works of course as that supports a lot more MIME types.

Why is there a restriction to do this via embed and not object?


A good place to ask advice about web development is at the mozillaZine "Web Development/Standards Evangelism" forum.

The helpers at that forum are more knowledgeable about web development issues.
You need to register at the mozillaZine forum site in order to post at that forum.

more options

Because the html is passed through a parser that strips 'data' so you cannot use data="url" which is asked by OBJECT to render this properly. If you can make that work using src="url", i'm all eyes.

Ie9, 10, and 11 render the embed code above fine. So does Chrome, Comodo, and surprisingly Opera. I am trying to use a video conferencing embed that is not in pure flash form so the code is on a mixed html page. It is preferred to use an IFRAME but that is parsed out as well. I am limited to object/embed without the data attribute.
That help? I'd just like to get my mozilla/FF/Safari users some love too.
more options

Firefox needs the data attribute in the object.
IE can do without it and have this data stored in a param tag.
You could consider to use a script to recreate the data attribute from a param tag with name="filename".

more options

You could consider to use a script to recreate the data attribute from a param tag with name="filename".

Please elaborate? And thank you for your help thus far.
more options

JavaScript code like this should copy the value of a filename or movie attribute to a data attribute in the object that contains this param tag. You would have to run the script on page load.

var a='data',E,e=document.querySelectorAll('object'),P,p,i,j;
if (e) {
 for (i=0; E=e[i]; i++) {
  if (!E.hasAttribute(a)) {
   p=E.querySelectorAll('param[name="filename"],param[name="movie"]');
   for (j=0; P=p[j]; j++) {
    if (!E.hasAttribute(a)) {
     E.setAttribute(a,P.value);
    }
   }
  }
 }
}

You can still ask advice at the above mentioned mozillaZine frum to see if they have a better solution for this problem.