rice-framework/krad-web/src/main/webapp/krad/scripts/krad.utility.js
/**
 * Attempts to find an element based on the given selector taking into consideration the portal.
 *
 * @param selector jquery selector to find element
 * @returns jquery object for found element, or null if an element was not found
 */
Attempts to find an element based on the given selector taking into consideration the portal.

@param selector jquery selector to find element
@returns jquery object for found element, or null if an element was not found
Attempts to find an element based on the given selector taking into consideration the portal . @param selector jquery selector to find element @returns jquery object for found element or null if an element was not found
function findElement(selector) {
    var jqElement;
    if (parent.jQuery('iframe[id*=easyXDM_]').length > 0) {
        jqElement = top.jQuery('iframe[id*=easyXDM_]').contents().find('#' + kradVariables.PORTAL_IFRAME_ID).contents().find(selector);
    } else if (parent.parent.jQuery('#' + kradVariables.PORTAL_IFRAME_ID).length > 0) {
        jqElement = parent.parent.jQuery('#' + kradVariables.PORTAL_IFRAME_ID).contents().find(selector);
    } else {
        jqElement = top.jq(selector);
    }
    return jqElement;
}
function findElement ( selector ) { var jqElement ; if ( parent . jQuery ( 'iframe[id*=easyXDM_]' ) . length > 0 ) { jqElement = top . jQuery ( 'iframe[id*=easyXDM_]' ) . contents ( ) . find ( '#' + kradVariables . PORTAL_IFRAME_ID ) . contents ( ) . find ( selector ) ; } else if ( parent . parent . jQuery ( '#' + kradVariables . PORTAL_IFRAME_ID ) . length > 0 ) { jqElement = parent . parent . jQuery ( '#' + kradVariables . PORTAL_IFRAME_ID ) . contents ( ) . find ( selector ) ; } else { jqElement = top . jq ( selector ) ; } return jqElement ; }
Attempts to find an element based on the given selector taking into consideration the portal.
Attempts to find an element based on the given selector taking into consideration the portal .
// portal and content on same domain
 // portal and content on different domain
