Jump to content

HTML e JavaScript


Recommended Posts


como posso aceder aos métodos que o meu objeto no Javascript?

no html tenho assim:

<script language="Javascript" src="geral.js" type="text/javascript"></script>
<body onload="init()"
<object id="OB" classid="CLSID:285A526A-F94F-4A38-A9CF-EAFFDB8B47B1" style="width="80" height="25"></object>

no geral.js tenho assim:

var obj = document.createElement("object");

function init()
System.Gadget.Flyout.file = "flyout.html";
System.Gadget.settingsUI = "Settings.html";
System.Gadget.onSettingsClosed = loadParams;
System.Gadget.Flyout.onHide = loadParams;

OB.CommPort = 3;
OB.settings = "9600,n,8,1";
//gadgetContent.innerText = OB.teste;

nao funciona e diz assim

Erro: O objeto não suporta a propriedade nem o método 'teste'

alguem me pode ajudar?


Edited by yoda
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.