In addition to existing methods/functionality provided by Ext.Element, ManagedIFrame extends the base Element class to provide additional IFRAME-relevant features.
Changes the current src attribute of the managed frame. Syntax:
setSrc( [ url [, discardUrl] [, callbackFn ] ])
Calling :setSrc without any parameters refreshes the frame src attribute to the last URL value provided in a previous :setSrc call. Parameter Description:
Possible events raised:
Example:
mif.setSrc( newUrl, false, docLoaded ); mif.setSrc( null, false, docLoaded ); //refresh the frame with the last url specified.
Resets the embedded document status to that of a neutral domain (or empty document). Syntax:
reset( [ url [, callbackFn ] ])
Parameter Description:
Note: the :reset function is useful where the domain context of the embedded document must change (eg. from a foreign document domain, to content written directly to the frame document using Ext.UpdateManager.
Overwrites the current embedded document structure with a new one using UpdateManager. (Ext.UpdateManager compatible) Syntax:
update( content [, loadScripts] [, callbackFn ] )
Parameter Description:
Possible events raised:
Example:
mif.update( "<div> Test content </div>", false, updCallBackFn );
Sends a message to the Window context of the components' managed IFRAME. (for implementation details, see Cross-frame messaging with ManagedIFrame)
Syntax:
sendMessage( message [, tag] [, origin ] )
Parameter Description:
Possible events raised:
Example:
Returns the Ext.Element wrapper for the DOM element/element-id located withing the scope of document object of the embedded frame, or null of not available. This provides standard Ext.Element interface interaction directly with the embedded document object.
Syntax:
get(element)
Returns the native DOM Element wrapper for the DOM element/element-id located withing the scope of document object of the embedded frame, or null of not available.
Syntax:
getDom(element)
Returns the Ext.CompositeElement for child nodes located withing the scope of document object of the embedded frame, or null of not available. This provides standard Ext.CompositeElement interface interaction directly with the returned node list.
Syntax:
select(selector [, unique])
Parameter Description:
Returns the Array of child DOM Element nodes located withing the scope of document object of the embedded frame, or null of not available. (the selector should not contain an id).
Syntax:
query(selector)
Parameter Description:
Returns the Ext.Element wrapper for the document object of the embedded frame, or null of not available. This provides standard Ext.Element interface interaction directly with the embedded document object.
Syntax:
getDoc()
Returns the DOM Element for the body of the document object of the embedded frame, or null of not available.
Syntax:
getBody()
Returns the document object of the embedded frame, or null of not available.
Syntax:
getDocument()
Returns the current URI of the embedded frame (if possible). A frames' document object is 'protected' when loaded from foreign domain, so the current URI may not be available. In that scenario, the URI value returned is the URI set programatically by the last call to the setSrc method.
Syntax:
getDocumentURI()
Returns the Window object of the embedded frame, or null of not available.
Syntax:
getWindow()
Activates the print dialog for the embedded frame document.
Syntax:
print()
Returns (true/false) indicating whether sufficient privilege exists to interact with the embedded documents' DOM or execute scripts with it. Note: Documents retrieved from foreign-domains will always report false.
Syntax:
domWritable()
This method toggles activation of a custom masking IMG (used during transparent masking operations)
Syntax:
toggleShim()
This method activates the configured loadMask (if enabled). Syntax:
showMask([msg, [, msgClass]])
Parameter Description:
This method deactivates the currently display loadMask (if enabled). Syntax:
hideMask([ forced ])
Parameter Description: