Jump to content

Access to the variable of another html


Guest Bat007
 Share

Recommended Posts

Guest Bat007

I create a method in 1_a.htm, using an object instanced in 1_b.htm. How could I call it from 1_a with the active instance ?Thanks"1_a.htm"<script langage="javascript"> function setScene() { document.seemobject; //is NULL why ? }"1_b.htm"<html><body bgcolor="MediumSpringGreen"> <object id="seemobject" height="100%" width="100%" ... <param ...> </object></body></html>Need some help please

Link to comment
Share on other sites

It's null because it's not a part of the document. You can't refer to another document's elements. Notice that you use the document object to refer to everything, and the document object only applies to the current document, you can't just reference some arbitrary element on another page. It would take the DOM forever to load and traverse.

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
 Share

×
×
  • Create New...