Search code examples
javascriptjqueryhtmlobject

How to call a JS function on HTML page loaded inside OBJECT Tag


I am loading a HTML page inside an tag, Since iPAD not supporting iFrame i am using the tag to load External html pages inside a container. Everything works fine, Now i want to call a function from a Loaded Page (Page which loaded inside ). Can any one help me to find out the solution ?

"<object id='page' width='100%' height='100%' data='"+pageURL+"' style='position:absolute;'></object>";

Solution

  • Finally i GOT the Solution for accessing the Javascript function of HTML page loaded inside Object Tag.

    window.objectID.functionName();
    

    This will call the function ("But it is not working in IE8"). Use iframe for IE.