Søg i 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.

Læs mere

Embed Object Plugin in PHP

  • 11 svar
  • 3 har dette problem
  • 2 visninger
  • Seneste svar af jimzarthur

more options
I have plugin and this plugin has function named Test() The plugin has installed on mozilla firefox add ons plugin. I try to embed the plugin using HTML object tag like
this.

<html>
    <head></head>
    <body>
        <object id='pluginobj' type='application/x-vnd-test-obj' width='0' height='0' style='position:absolute;bottom:0px;right:0px'></object>
   </body>  
</html>

This HTML is working and I can run the object function via javascript using: document.getElementById("pluginobj").Test()

But when I change this file to php and deploy to apache, I can't get the object function using the same way.

What should I do?

I have plugin and this plugin has function named Test() The plugin has installed on mozilla firefox add ons plugin. I try to embed the plugin using HTML object tag like <pre><nowiki>this. <html> <head></head> <body> <object id='pluginobj' type='application/x-vnd-test-obj' width='0' height='0' style='position:absolute;bottom:0px;right:0px'></object> </body> </html></nowiki></pre> This HTML is working and I can run the object function via javascript using: document.getElementById("pluginobj").Test() But when I change this file to php and deploy to apache, I can't get the object function using the same way. What should I do?

Ændret af cor-el den

Alle svar (11)

more options

Assuming the plugin is set to "Ask to Activate" does the Page Info dialog Permissions panel show that the remote page is allowed to use it?

You can call that up using any of these:

  • right-click a blank area of the page and choose View Page Info > Permissions
  • (menu bar) Tools menu > Page Info > Permissions
  • click the padlock or "i" icon to the left of the site address, then the ">" icon, then More Information > Permissions

Near the top, you'll find a list of your enabled plugins and the site's permission to use them.


If it's not a permission issue, I assume you viewed the source of the page as received by Firefox, and viewed the rendered HTML in the Inspector. Is it getting corrupted in transit, or in loading?

You also could open the local page and the remote page in different tabs and check the requests for plugin content to see whether they are requested and whether they load. In each tab, open the Network Monitor and reload the page to follow the requests.

more options

Hi jscher2000,

Thanks for your reply. But your solution is not help me to out of my problem. Can you achieve something about technical to integrate my plugin in PHP ? Thanks

more options

Is the HTML code for the object identical in the page's source code whether you load the local page or the one sent from the remote server? Confirm by using Ctrl+u to view the source of each page.

Plugins run only in the browser, not on the server, so you want Firefox to receive the identical code however you send the page.

more options

Hi jscher2000,

The HTML is sent from the remote server. I try to browse from clien and the plugins is installed on client. So what should i do to call a function from plugin that installed on client side ? Please help me.

more options

If the code is identical, and the permission is okay, and the Network Monitor shows that your media is loading, and the Web Console does not show any error messages, then there's nothing else for me to work with.

(1) Do you want to post a link to the non-working page?

(2) Have you tested in Firefox's Safe Mode? In Safe Mode, Firefox temporarily deactivates extensions, hardware acceleration, and some other advanced features to help you assess whether these are causing the problem.

If Firefox is not running: Hold down the Shift key when starting Firefox.

If Firefox is running: You can restart Firefox in Safe Mode using either:

  • "3-bar" menu button > "?" button > Restart with Add-ons Disabled
  • Help menu > Restart with Add-ons Disabled

and OK the restart.

Both scenarios: A small dialog should appear. Click "Start in Safe Mode" (not Refresh).

Any improvement?

more options

Hi fscher2000,

1) Link :Page

in that link you can inspect the element of Object. The plugin have function named getVersion(). Just try call the function of plugin using javascript like this:

document.getElementById("pluginobj").getVersion()

2) I haven't tested in safe mode because i need call the plugin. As i tell you the condition is i can run html file in client side and get all the function of plugin. But when i test in php file on server, i cant get anything. Thanks

more options

I don't have that plugin, so nothing happens for me. Can you test without the dimension attributes? Firefox may decline to instantiate an object with height and width set to zero.

more options

Hi you can download the plugin using this Link

As i tell you i can run in .html (client side). The attributes is not the problem, because the plugin not display anything on the browser. I just want to call function on the plugin. Please advice to make my plugin working in web server.

more options

jimzarthur said

The attributes is not the problem, because the plugin not display anything on the browser.

But you will test it to see if that makes a difference?

more options

If you display Firefox's Web Console on the page and run your line of code there --

document.getElementById("pluginobj").getVersion();
document.getElementById("pluginobj").Test();

-- what error message(s) do you get back?

See also: https://developer.mozilla.org/docs/Tools/Web_Console

more options

Yes i have tested without attributes.

The error message is: TypeError: document.getElementById(...).getVersion is not a function

I think because the plugin is not loaded.