IE iframe and frame

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Strydker
Posts: 10
Joined: 07 Apr 2016, 08:46

IE iframe and frame

24 Jan 2017, 13:53

I will post more code later but first I wanted to ask if it's possible to access a frame inside an iframe?

I've been using a website that a frame in it and it was working just fine until they changed the website and now contains an iframe first then the frame.

Now I've done all my searching through the forums and read the discussions. I've tried wrapping the iframe along with the frame and again separately.

Here is the HTML from the website. It's the full code as it's secure so if you wanted to recreate a standalone

Code: Select all

<HTML xmlns="http://www.w3.org/1999/xhtml" xmlns:pt = "http://www.plumtree.com/xmlschemas/ptui/" xmlns:v = "urn:schemas-microsoft-com:vml"><HEAD><META content="IE=5.0000" http-equiv="X-UA-Compatible">
<TITLE>Manage Eligibility</TITLE><!-- This page uses the base page layout. -->
<SCRIPT type=text/javascript>
if (!document.getElementById('PTIncluder-js')) {
document.write('<script id="PTIncluder-js" type="text/javascript" src="https://client.medco.com/imageserver/plumtree/common/private/js/jsincluder/LATEST/PTIncluder.js"></scr'+'ipt>');
}
</SCRIPT>
 
<SCRIPT id=PTIncluder-js type=text/javascript src="https://client.medco.com/imageserver/plumtree/common/private/js/jsincluder/LATEST/PTIncluder.js"></SCRIPT>
 
<SCRIPT type=text/javascript>
PTIncluder.imageServerURL = 'https://client.medco.com/imageserver/';
PTIncluder.basePath = 'plumtree/common/private/js/';
PTIncluder.lang = 'en';
PTIncluder.country = 'US';
PTIncluder.debug = false;
PTIncluder.loadComponent('jsportlet');
</SCRIPT>
 
<SCRIPT type=text/javascript src="https://client.medco.com/imageserver/plumtree/common/private/js/jsportlet/LATEST/component.js"></SCRIPT>
 
<SCRIPT type=text/javascript src="https://client.medco.com/imageserver/plumtree/common/private/js/jsutil/LATEST/Strings/PTU-Date-en.js"></SCRIPT>
 
<SCRIPT type=text/javascript src="https://client.medco.com/imageserver/plumtree/common/private/js/jsutil/LATEST/Strings/PTU-Number-en.js"></SCRIPT>
 
<SCRIPT type=text/javascript src="https://client.medco.com/imageserver/plumtree/common/private/js/jsutil/LATEST/PTUtil.js"></SCRIPT>
 
<SCRIPT type=text/javascript src="https://client.medco.com/imageserver/plumtree/common/private/js/jsutil/LATEST/PTDateFormats.js"></SCRIPT>
 
<SCRIPT type=text/javascript src="https://client.medco.com/imageserver/plumtree/common/private/js/jsxml/LATEST/PTXML.js"></SCRIPT>
 
<SCRIPT type=text/javascript src="https://client.medco.com/imageserver/plumtree/common/private/js/jsportlet/LATEST/PTPortletServices.js"></SCRIPT>
 
<SCRIPT type=text/javascript>
pt_335 = new PTPortlet('335', '{C144BB97-A17A-2EAA-2C2F-92B22EEEC000}', '', 'pt-portlet-content-335', 'http://cwsportlets.medco.com:26046', 'http://cwsportlets.medco.com:26046/imageserver/plumtree/portal/CWSnew/pagelayouts', 'https://client.medco.com/portal/server.pt/gateway/PTARGS_0_128177_335_0_0_47/', 'https://client.medco.com/portal/server.pt/gateway/PTARGS_0_128177_335_0_0_47/', 'false', 'https://client.medco.com/portal/server.pt/gateway/PTARGS_6_128177_335_0_0_47/');</SCRIPT>
 
<META content="text/html; charset=UTF-8" http-equiv=Content-Type>
<META content=NO-CACHE http-equiv=CACHE-CONTROL>
<META content=NO-CACHE http-equiv=PRAGMA>
<SCRIPT type=text/javascript>
if ((document.location.href.indexOf("/community/home") != -1) && (self != top)) { top.location.replace(location); }</SCRIPT>
<LINK rel=stylesheet type=text/css href="https://client.medco.com/imageserver/plumtree/portal/CWSnew/css/CIP_Styles.css"><LINK rel=stylesheet type=text/css href="https://client.medco.com/imageserver/plumtree/portal/CWSnew/css/cwsstyles2009.css"><LINK rel=stylesheet type=text/css href="https://client.medco.com/imageserver/plumtree/portal/CWSnew/css/cwsmainstyle.css"><!-- Dojo is used by drag and drop and flyout editor -->
<SCRIPT type=text/javascript src="https://client.medco.com/imageserver/plumtree/portal/CWSnew/js/mmmcconstants.js"></SCRIPT>
 
<SCRIPT type=text/javascript src="https://client.medco.com/imageserver/plumtree/portal/CWSnew/js/dojo.js"></SCRIPT>
 
<SCRIPT onreadystatechange="if(this.readyState=='complete'){dojo._loadInit();}" defer src="//:"></SCRIPT>
 
<STYLE>v\:* {
                BEHAVIOR: url(#default#VML)
}
</STYLE>
 
<SCRIPT type=text/javascript src="https://client.medco.com/imageserver/plumtree/portal/CWSnew/js/jquery-1.2.6.js"></SCRIPT>
 
<SCRIPT language=javascript>
function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}
</SCRIPT>
 
<SCRIPT type=text/javascript>
 
 
function querySt(ji) {
hu = window.location.search.substring(1);
gy = hu.split("&");
for (i=0;i<gy.length;i++) {
ft = gy[i].split("=");
if (ft[0] == ji) {
return ft[1];
}
}
}
 
 
function get_cookie ( cookie_name ) {
var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );
if ( results )
                return ( unescape ( results[2] ) );
else return null;
}
 
function OpenFullScreen(url)
{
                //if request is not coming from cip reporting nav link
                if ((url.indexOf("/cipWeb") == 0) || (url.indexOf("/qmWeb") == 0) || (url.indexOf("/expadvisor") == 0))
                                url = escape(strCIPBaseUrl) + url;
                else
                {
                                if (url.indexOf(strReportingServerHost) < 0)
                                                url = escape(url);
                }
                if  (document.location.href.indexOf("/community/") > 0)
                {
                                if (PTPortalContext.commId == strEligibilityCommunityID)
                                                window.location =pt_335.transformURL( strFullScreenGatewayPrefix + PTPortalContext.commId + "_0_43/" + strImageServerGatewayUrl + "/imageserver/plumtree/portal/CWSnew/opener/ESDNavigation.html?ptAppURL=" + url);
                                else
                                                window.location =pt_335.transformURL( strFullScreenGatewayPrefix + PTPortalContext.commId + "_0_43/" + strImageServerGatewayUrl + "/imageserver/plumtree/portal/CWSnew/opener/MedcoNavigation.html?ptAppURL=" + url);
                }
                else
                {
                                window.location =pt_335.transformURL( strFullScreenGatewayPrefix + get_cookie("MMMCCurrentCommunity") + "_0_43/" + strImageServerGatewayUrl + "/imageserver/plumtree/portal/CWSnew/opener/MedcoNavigation.html?ptAppURL=" + url);
                }
}
 
 
function OpenFullScreensid(url)
{
                var url = url.split(",");
                var url1 = url[0];
                var sid=url[1];
                var appName = url[2];
                var pagename = escape(url[2]);
                document.cookie = 'MMMCCurrentPageName=' + pagename + ' ; path=/' + ' ; domain=medco.com';
                document.cookie = 'MMMCCurrentPageId=0 ; path=/' + ' ; domain=medco.com';
 
                if (pagename.indexOf("Load") > 0){
           var C360win = window.open(pt_335.transformURL(url1), "C360","menubar=yes,toolbar=yes,status=yes,location=yes,height=500,width=825,scrollbars=yes,resizable=yes,left=35,top=30,screenX=200,screenY=200");
                                if (C360win.opener == null) // if something went wrong
                                                C360win.opener = window;
                                C360win.opener.name = "coverage360";
                                C360win.focus();
        }
                else if(appName == "Benefit Administrator"){
                               var BAwin = window.open(pt_335.transformURL(url1), "BenefitAdministrator","menubar=yes,toolbar=yes,status=yes,location=yes,height=500,width=825,scrollbars=yes,resizable=yes,left=35,top=30,screenX=200,screenY=200");
                if (BAwin.opener == null) // if something went wrong
                        BAwin.opener = window;
                BAwin.opener.name = "Benefit Administrator";
                BAwin.focus();
                                }
                else
       {
                if(url1.indexOf("medco.com") > 0){
                                if (document.location.href.indexOf("/community/") > 0)
                                {
                                                if (PTPortalContext.commId == strEligibilityCommunityID)
                                                                window.location =pt_335.transformURL( strFullScreenGatewayPrefix + PTPortalContext.commId + "_0_43/" + strImageServerGatewayUrl  + "/imageserver/plumtree/portal/CWSnew/opener/ESDNavigation.html?ptAppURL=" + escape(url1  + get_cookie(sid)) );
                                                else
                                                                window.location =pt_335.transformURL( strFullScreenGatewayPrefix + PTPortalContext.commId + "_0_43/" + strImageServerGatewayUrl  + "/imageserver/plumtree/portal/CWSnew/opener/MedcoNavigation.html?ptAppURL=" + escape(url1  + get_cookie(sid)) );
                                }
                                else
                                {
                                                if (get_cookie("MMMCCurrentCommunity") == strEligibilityCommunityID)
                                                                window.location =pt_335.transformURL( strFullScreenGatewayPrefix + get_cookie("MMMCCurrentCommunity") + "_0_43/" + strImageServerGatewayUrl + "/imageserver/plumtree/portal/CWSnew/opener/ESDNavigation.html?ptAppURL=" + escape(url1 + get_cookie(sid)) );
 
                                                else       
                                                                window.location =pt_335.transformURL( strFullScreenGatewayPrefix + get_cookie("MMMCCurrentCommunity") + "_0_43/" + strImageServerGatewayUrl + "/imageserver/plumtree/portal/CWSnew/opener/MedcoNavigation.html?ptAppURL=" + escape(url1 + get_cookie(sid)) );
                               
                                }
                }
       }
}
 
 
function OpenCoverage360sid_remove(url){
 
                var url = url.split(",");
                var url1 = url[0];
                var sid=url[1];
                var finalurl =""; 
                var c360URIParam = get_cookie("C360URIParam");
                var jsession = get_cookie("cip_jsessionid");
 
                //alert(c360URIParam);
                finalurl = url1+c360URIParam+"/!OpenPortal?pyActivity=Data-Portal.ShowSelectedPortal&portal=EXTCoverageReviewSupervisor&Name=EXTCoverageReviewSupervisor";
                //alert(finalurl );
                                                               
                var C360win = window.open(pt_335.transformURL(finalurl), "C360","menubar=no,toolbar=no,status=no,location=no,height=500,width=825,toolbar=0,scrollbars=yes,resizable=yes,left=35,top=30,screenX=200,screenY=200");
                                if (C360win.opener == null) // if something went wrong
                                C360win.opener = window;
                                C360win.opener.name = "coverage360";
                                C360win.focus();
}
 
 
function PortalRefresh()
{
                window.location =pt_335.transformURL( strCIPPortalPageUrl);
}
 
function PortalReDraw()
{
 
}
 
//Portal Gateway for CIP..
 
function getGatewayedUrl(url)
{
                var jsession = get_cookie("cip_jsessionid");
                var finalurl = "";
                if ((url.indexOf("/cipWeb") == 0) || (url.indexOf("/qmWeb") == 0))
                                url = strCIPGatewayBaseUrl + url;
 
                if (url.indexOf("?") == -1){
                                finalurl = strCIPClientGatewayURL + url + escape(";jsessionid=" + jsession);}
                else
                {
                                var queryst = url.substring(url.indexOf("?"));
                                var baseurl = url.substring(0,url.indexOf("?"));
                                finalurl = strCIPClientGatewayURL + baseurl + escape(";jsessionid=" + jsession) + queryst;
                }
                if (null != jsession)
                                return finalurl;
                else
                                return url;
}
 
//Display popup window after certain period of non-activitty
                                        var portalx =intIdleTime ;
                                        var portaly = 1;
                                        function MMMCstartClock(){
                                                                                portalx = portalx-portaly
                                                                                setTimeout("MMMCstartClock()", 1000)
                                                                                if(portalx==0){
                                                                                                open_sessiontimeout();
                                                                                                portalx=intIdleTime ;
                                           }
                                        }
 
                                                var portalx1 = intPTRefresh;
                                        var portaly1 = 1;
                                        function MMMCPTRefresh(){
                                                                                portalx1 =portalx1-portaly1;
                                                                                setTimeout("MMMCPTRefresh()", 1000);
                                                                                if(portalx1==0){
                                                                                //            alert('x1 = ' + portalx1 + 'y1 = ' + portaly1);
                                                                                                window.location.reload();
                                                                                                portalx1=intPTRefresh;
                                           }
                                        }
 
 
function open_sessiontimeout(){
                                                    var tempscript=window.open(pt_335.transformURL('Javascript:"Client.Medco.Com"'),"","left=350,top=300,screenX=200,screenY=200,menubar=no,toolbar=no,status=no,location=no,scrollbars=NO,resizable=NO,width=320,height=70");
                                                                tempscript.document.write(varMMMCSSOPOPTXT);
                                                }             
 
                var currenturl = document.location.href;
 
                if (currenturl.indexOf("/opener") < 0)
                {
                                MMMCstartClock();
                                MMMCPTRefresh();
                }
 
 
</SCRIPT>
<!--javascript for breaking news -->
<SCRIPT type=text/javascript>
pt_574 = new PTPortlet('574', '{5CE9CEC1-6907-A614-5DD1-928F313BA000}', 'CWS new header Portlet', 'pt-portlet-content-574', 'http://cwsportlets.medco.com:26046', 'http://cwsportlets.medco.com:26046/imageserver/plumtree/portal/CWSnew/pagelayouts', 'https://client.medco.com/portal/server.pt/gateway/PTARGS_0_128177_574_212_0_43/', 'https://client.medco.com/portal/server.pt/gateway/PTARGS_0_128177_574_212_0_43/', 'false', 'https://client.medco.com/portal/server.pt/gateway/PTARGS_6_128177_574_212_51_43/');</SCRIPT>
 
<SCRIPT type=text/javascript>
pt_573 = new PTPortlet('573', '{5CE9CEC1-6907-A614-5DD1-928F174C8000}', 'CWS new footer Portlet', 'pt-portlet-content-573', 'http://cwsportlets.medco.com:26046', 'http://cwsportlets.medco.com:26046/imageserver/plumtree/portal/CWSnew/pagelayouts', 'https://client.medco.com/portal/server.pt/gateway/PTARGS_0_128177_573_212_0_43/', 'https://client.medco.com/portal/server.pt/gateway/PTARGS_0_128177_573_212_0_43/', 'false', 'https://client.medco.com/portal/server.pt/gateway/PTARGS_6_128177_573_212_51_43/');</SCRIPT>
 
<SCRIPT id=pt-includer type=text/javascript></SCRIPT>
 
<SCRIPT type=text/javascript>  function buildURLFromTemplate(strID)
                {
                                var arArgs = strID.split(',');
                if(!arArgs){
                  alert('Invalid menu ID');
                  return null; }
                if(arArgs[0] == 'C'){
                var strCommURL = PTCommonOpener.getOpenerURLOpenObjID(512, arArgs[1], '&PageID='+arArgs[2]+'', 2)
                if ( arArgs.length > 3) { strCommURL += '&ProfileID='+arArgs[3]; }
                  return strCommURL;
                } else if (arArgs[0] == 'M') {
                return PTCommonOpener.getOpenerURLOpenObjID(518, 128177, '&PageID='+arArgs[1]+'', 2)
                } else if (arArgs[0] == 'SM') {
                  return 'https://client.medco.com/portal/server.pt?open=space&name=SiteMap&psname=Gateway&psid=None&cached=true&in_hi_userid=128177&control=SetSiteMap&CommunityID='+arArgs[1]+'&Mode='+arArgs[2]+(eval(arArgs[3]) ? '&Preview=' : '');
                } else if (arArgs[0] == 'S') {
                  return null;
                } else if (arArgs[0] == 'E') {
                    var params = '';
                    if ( arArgs.length > 1 ) {
                      for ( var i = 2; i < arArgs.length; i++ ) {
                        params += '&' + arArgs[i];
                      } }
                  return 'https://client.medco.com/portal/server.pt?open=space&name='+arArgs[1]+'&psname=Gateway&psid=None&cached=true&in_hi_userid=128177' + params;
                } else if (arArgs[0] == 'D') {
                return PTCommonOpener.getOpenerURLOpenObjID(17, arArgs[2], '&DirMode='+arArgs[1]+'', 2)
                } else if (arArgs[0] == 'G1') {
                    var params = '';
                    if ( arArgs.length > 1 ) {
                      for ( var i = 2; i < arArgs.length; i++ ) {
                        params += '&' + arArgs[i];
                      } }
                  return 'https://client.medco.com/portal/server.pt?open=space&name='+arArgs[1]+'&psname=Gateway&psid=None&cached=true&in_hi_userid=128177' + params;
                } else if (arArgs[0] == 'IF') {
                  return arArgs[1];
                } else {
                    alert('URL Type is not defined');
                    return null; }
                }
                function templateURLRedirect(templateURL) {
                  if (templateURL == null) { return null; }
                  var arArgs = templateURL.split(',');
                if (arArgs[0] == 'UP') {
                PTCommonOpener.openInSameWindow(PTCommonOpener.getOpenerURLOpenObjID(1, arArgs[1], 'null', 2));
                } else if (arArgs[0] == 'DO') {
                PTCommonOpener.openInSameWindow(PTCommonOpener.getOpenerURLOpenObjID(18, arArgs[1], 'null', 2));
                } else if (arArgs[0] == 'F') {
                  window.location = arArgs[1];
                } else {
                   window.location = buildURLFromTemplate(templateURL);
                }
               
                }
</SCRIPT>
 
<SCRIPT type=text/javascript>
if (!document.getElementById('PTIncluder-js')) {
document.write('<script id="PTIncluder-js" type="text/javascript" src="https://client.medco.com/imageserver/plumtree/common/private/js/jsincluder/LATEST/PTIncluder.js"></scr'+'ipt>');
}
</SCRIPT>
 
<SCRIPT type=text/javascript>
PTIncluder.imageServerURL = 'https://client.medco.com/imageserver/';
PTIncluder.basePath = 'plumtree/common/private/js/';
PTIncluder.lang = 'en';
PTIncluder.country = 'US';
PTIncluder.debug = false;
PTIncluder.loadComponent('jsportlet');
</SCRIPT>
 
<SCRIPT type=text/javascript>var g_PTImgSvrImgsURL = "https://client.medco.com/imageserver/plumtree/portal/private/img/";
var g_SharedImgSvrImgsURL = "https://client.medco.com/imageserver/plumtree/portal/public/img/";var g_HelpSvrBaseURL = "https://client.medco.com/imageserver/plumtree/";
</SCRIPT>
 
<SCRIPT type=text/javascript>
if (!document.getElementById('PTIncluder-js')) {
document.write('<script id="PTIncluder-js" type="text/javascript" src="https://client.medco.com/imageserver/plumtree/common/private/js/jsincluder/LATEST/PTIncluder.js"></scr'+'ipt>');
}
</SCRIPT>
 
<SCRIPT type=text/javascript>
PTIncluder.imageServerURL = 'https://client.medco.com/imageserver/';
PTIncluder.basePath = 'plumtree/common/private/js/';
PTIncluder.lang = 'en';
PTIncluder.country = 'US';
PTIncluder.debug = false;
PTIncluder.loadComponent('jsrobohelp');
</SCRIPT>
 
<SCRIPT type=text/javascript src="https://client.medco.com/imageserver/plumtree/common/private/js/jsrobohelp/LATEST/component.js"></SCRIPT>
 
<SCRIPT type=text/javascript src="https://client.medco.com/imageserver/plumtree/common/private/js/jsrobohelp/LATEST/PTRoboHelp.js"></SCRIPT>
 
<SCRIPT type=text/javascript>
function OpenerAS_GetApplicationBaseURL()
{
                return "https://client.medco.com/portal/server.pt?";
}
function OpenerAS_GetCurrentUserID()
{
                return "128177";
}
function OpenerAS_GetParentSpaceName()
{
                return "";
}
function OpenerAS_GetParentSpaceID()
{
                return "";
}
</SCRIPT>
 
<SCRIPT type=text/javascript>function getJSUtilVersionObject() { return 'window';}</SCRIPT>
 
<SCRIPT type=text/javascript src="https://client.medco.com/imageserver/plumtree/portal/private/js/ptcommonopener.js"></SCRIPT>
 
<SCRIPT type=text/javascript>/** The object that holds the safe variables. Store the vars as properties on the object, like a hashtable. **/
var gSafeJSVarContainer = new Object();
/** Define a new safe variable, pass the in the name and the value.Returns true if successful, method call will fail if the value is invalid. **/
function addSafeVar(strName, oValue) {
                gSafeJSVarContainer[strName] = oValue;
                return true;
}
/** Retrieve a safe var. Returns false if the variable is undefined  or if the value is actually false, but safe vars shouldn't be usedto store simple boolean values anyway. **/
function getSafeVar(strName) {
                var temp = gSafeJSVarContainer[strName];
                if (temp) { return temp; }
                else { return false;}
}
/** Retrieve a safe var, if the variable is undefined an alert will showwith the name of the variable. Use this method to retrieve criticalvariables. **/
function getSafeVarWarn(strName) {
                var temp = gSafeJSVarContainer[strName];
                if (temp) { return temp; }
                else { alert('Safe Variable: '+strName+' is not defined!'); }
}
</SCRIPT>
 
<SCRIPT type=text/javascript>var windowOnloadFunction = (window.onload) ? window.onload : new Function;
document.PCC.RegisterForWindowEvent("onload", windowOnloadFunction);
var windowOnBlurFunction = (window.onblur) ? window.onblur : new Function;
document.PCC.RegisterForWindowEvent("onblur", windowOnBlurFunction);
var windowOnFocusFunction = (window.onfocus) ? window.onfocus : new Function;
document.PCC.RegisterForWindowEvent("onfocus", windowOnFocusFunction);
</SCRIPT>
 
<SCRIPT type=text/javascript>function getJSXMLVersionObject() { return 'window';}</SCRIPT>
<!-- Conditional CSS to deal with IE in Quirks mode -->
<STYLE type=text/css>.nav_sel {
                FONT-SIZE: 12px; TEXT-DECORATION: none !important; BORDER-RIGHT: #40b1e1 1px solid; BACKGROUND-IMAGE: url(/imageserver/plumtree/portal/CWSnew/art/nav_green_bg.gif); BACKGROUND-REPEAT: repeat-x; FONT-WEIGHT: bold; COLOR: #054888 !important; TEXT-ALIGN: center; PADDING-LEFT: 10px; DISPLAY: block; LINE-HEIGHT: 25px; PADDING-RIGHT: 10px
}
.nav {
                FONT-SIZE: 12px; TEXT-DECORATION: none; BORDER-RIGHT: #40b1e1 1px solid; BACKGROUND-IMAGE: url(/imageserver/plumtree/portal/CWSnew/art/nav_blue_bg.gif); BACKGROUND-REPEAT: repeat-x; FONT-WEIGHT: bold; COLOR: #ffffff; TEXT-ALIGN: center; PADDING-LEFT: 10px; DISPLAY: block; LINE-HEIGHT: 25px; PADDING-RIGHT: 10px
}
.nav A:hover {
                FONT-SIZE: 12px; TEXT-DECORATION: none; BORDER-RIGHT: #40b1e1 1px solid; BACKGROUND-IMAGE: url(/imageserver/plumtree/portal/CWSnew/art/nav_green_bg.gif); BACKGROUND-REPEAT: repeat-x; FONT-WEIGHT: bold; COLOR: #ffffff; TEXT-ALIGN: center; PADDING-LEFT: 10px; DISPLAY: block; LINE-HEIGHT: 25px; PADDING-RIGHT: 10px
}
#nav_holder_left {
                HEIGHT: 25px; BACKGROUND-IMAGE: url(/imageserver/plumtree/portal/CWSnew/art/nav_left.png); BACKGROUND-REPEAT: repeat-y; BACKGROUND-POSITION: left 50%; PADDING-LEFT: 13px
}
* HTML #nav_holder_left {
                BACKGROUND: none transparent scroll repeat 0% 0%; FILTER: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/imageserver/plumtree/portal/CWSnew/art/nav_left.png',sizingMethod='scale')
}
#nav_holder_center {
                HEIGHT: 25px; WIDTH: 100%; BACKGROUND-IMAGE: url(/imageserver/plumtree/portal/CWSnew/art/nav_blue_bg.gif); BACKGROUND-REPEAT: repeat-x
}
#nav_holder_right {
                HEIGHT: 25px; WIDTH: 20px; BACKGROUND-IMAGE: url(/imageserver/plumtree/portal/CWSnew/art/center_right.png); BACKGROUND-REPEAT: repeat-y; BACKGROUND-POSITION: right 50%; PADDING-RIGHT: 9px
}
* HTML #nav_holder_right {
                BACKGROUND: none transparent scroll repeat 0% 0%; FILTER: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/imageserver/plumtree/portal/CWSnew/art/center_right.png',sizingMethod='scale')
}
#nav_holder_right_blue {
                HEIGHT: 25px; BACKGROUND-IMAGE: url(/imageserver/plumtree/portal/CWSnew/art/nav_blue_bg.gif); BACKGROUND-REPEAT: repeat-x
}
#center_left {
                WIDTH: 13px; BACKGROUND-IMAGE: url(/imageserver/plumtree/portal/CWSnew/art/subnav_left.png); BACKGROUND-REPEAT: repeat-y
}
#center_left DIV {
                WIDTH: 13px
}
* HTML #center_left {
                BACKGROUND: none transparent scroll repeat 0% 0%; FILTER: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/imageserver/plumtree/portal/CWSnew/art/subnav_left.png',sizingMethod='scale')
}
#center_center {
                FONT-SIZE: 12px; WIDTH: 100%; COLOR: #333333; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; BACKGROUND-COLOR: #ffffff
}
#center_right {
                WIDTH: 9px; BACKGROUND-IMAGE: url(/imageserver/plumtree/portal/CWSnew/art/subnav_right.png); BACKGROUND-REPEAT: repeat-y
}
#center_right DIV {
                WIDTH: 9px
}
* HTML #center_right {
                BACKGROUND: none transparent scroll repeat 0% 0%; FILTER: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/imageserver/plumtree/portal/CWSnew/art/subnav_right.png',sizingMethod='scale')
}
</STYLE>
 
<SCRIPT type=text/javascript>
 
 
function OpenHelpCommunity(url)
{
 
                //alert(PTPortalContext.commId);
                var communityid = 0;
                if (document.location.href.indexOf("/community/") > 0)
                                communityid = PTPortalContext.commId;
                else
                                communityid = get_cookie("MMMCCurrentCommunity");
               
                if(communityid == strHomeCommunityID)
                {
                window.location =pt_335.transformURL( strHomeCommunityHelpURL);
                }
                else if(communityid == strEligibilityCommunityID)
                {
                window.location =pt_335.transformURL( strEligibilityCommunityHelpURL);
                }
                else if(communityid == strReportingCommunityID)
                {
                window.location =pt_335.transformURL( strReportingCommunityHelpURL);
                }
                else if(communityid == strCollaborationCommunityID)
                {
                window.location =pt_335.transformURL( strCollaborationCommunityHelpURL);
                }
                else if(communityid == strBenefitsCommunityID)
                {
                window.location =pt_335.transformURL( strBenefitsCommunityHelpURL);
                }
                else if(communityid != "0")
                {
                window.location =pt_335.transformURL( strHomeCommunityHelpURL);
 
                }
               
}
 
function GetFullScreenUrl(url)
{
       var finalurl = strFullScreenGatewayPrefix + PTPortalContext.commId + "_0_43/" + strImageServerGatewayUrl + "/imageserver/plumtree/portal/CWSnew/opener/MedcoNavigation.html?ptAppURL=" + url;
       return finalurl;
}
 
 
function CWSBodyLoad()
{
                if (document.getElementById('appFrame') != null)
                                document.getElementById('appFrame').style.height = document.body.clientHeight - 161;
}
 
</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: hidden; DISPLAY: block" topMargin=0>
<SCRIPT type=text/javascript>
 
if (document.location.href.indexOf("/community/") != -1)
{
                if (self == top) {
                                document.getElementsByTagName('body')[0].style.display = 'block';
                } else {
                top.location =pt_335.transformURL( self.location);
                }
} else {
                document.getElementsByTagName('body')[0].style.display = 'block';
}
</SCRIPT>
 
<DIV id=ali-bannerWelcome style="FONT-WEIGHT: bold">Welcome, Chris </DIV>
<DIV id=top_nav>
<DIV id=links><A href="javascript:window.location=pt_335.transformURL(strUserProfileCommunityUrl);">User Profile</A> | <A href="javascript:open_glossary();">Glossary</A> | <A href="javascript:OpenHelpCommunity()">Help & FAQs</A> | <A href="javascript:open_contactus();">Contact Us</A> | <A href="javascript:doLogOut()">Log Out</A> </DIV></DIV>
<SCRIPT type=text/javascript>
//fix welcome message..
 
if (document.location.href.indexOf("/community/") != -1)
{
                var mywelcome = unescape(document.getElementById('ali-bannerWelcome').innerHTML);
                document.getElementById('ali-bannerWelcome').innerHTML = mywelcome;
                document.cookie = 'CIPWelcome=' + escape(mywelcome) + ' ; path=/' ;
}
else
{
                var welcomecookie = get_cookie("CIPWelcome");
                document.getElementById('ali-bannerWelcome').innerHTML = unescape(welcomecookie);
}
</SCRIPT>
 
<STYLE type=text/css>#cws_header_left {
                HEIGHT: 99px; WIDTH: 182px; BACKGROUND-IMAGE: url(https://client.medco.com/imageserver/plumtree/portal/CWSnew/art/header_left.png); BACKGROUND-REPEAT: no-repeat
}
* HTML #cws_header_left {
                BACKGROUND: none transparent scroll repeat 0% 0%; FILTER: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://client.medco.com/imageserver/plumtree/portal/CWSnew/art/header_left.png',sizingMethod='scale')
}
#CW_home {
                HEIGHT: 23px; WIDTH: 156px; POSITION: relative; LEFT: 23px; TOP: 17px
}
#cws_header_center {
                HEIGHT: 99px; WIDTH: 100%; BACKGROUND-IMAGE: url(https://client.medco.com/imageserver/plumtree/portal/CWSnew/art/header_center.png); BACKGROUND-REPEAT: repeat-x
}
* HTML #cws_header_center {
                BACKGROUND: none transparent scroll repeat 0% 0%; FILTER: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://client.medco.com/imageserver/plumtree/portal/CWSnew/art/header_center.png',sizingMethod='scale')
}
#cws_header_right {
                HEIGHT: 99px; WIDTH: 368px; BACKGROUND-IMAGE: url(https://client.medco.com/imageserver/plumtree/portal/CWSnew/art/header_right.png); BACKGROUND-REPEAT: no-repeat
}
* HTML #cws_header_right {
                BACKGROUND: none transparent scroll repeat 0% 0%; TEXT-ALIGN: right; FILTER: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://client.medco.com/imageserver/plumtree/portal/CWSnew/art/header_right.png',sizingMethod='scale')
}
#Medco_home {
                HEIGHT: 25px; WIDTH: 92px; RIGHT: 25px; POSITION: relative; TOP: 17px
}
</STYLE>
 
<SCRIPT>
function CWS_Search(){
                var query = document.cws_searchform.search_field.value;
                var queryString = query.replace(/ /g,"");
                var containsWord = false;
 
                if (queryString == "") {
                                alert("Your search box is empty. Please enter valid  search query in the search box.");
                                return;
                } else if (queryString.length <= 2) {
                                alert("You must have a minimum of 2 letters or more. Please enter valid search query in the search box.");
                                return;
                }
 
                var unsafeString = "~`!@#$%^&*()_+|\\}][:\"'?/>.<";
 
 
                for (var i=0; i<queryString.length ; i++ ) {
                                if (unsafeString.indexOf(queryString.substring(i,i+1)) < 0) {
                                                containsWord = true;
                                }
                }
 
                  // if any invalid characters, reject it. done by yathish
                  var invalidCharSet = new RegExp("[_(')(!)(#)($)(%)(\&)(\=)(`)(~)(@)(\*)(\^)(\+)(\/)(\?)(\{)(\|)(\})(\.)(\<)(\>)]");   
                  if (invalidCharSet.test(queryString))
                  {
                                containsWord = false;
                  }
 
                if (!containsWord) {
                                                alert("Error! Special characters are not allowed. Please try again.");
                                                return;
                }
 
                window.location =pt_574.makeAbsoluteURL( strCWSSearchResultsUrl + escape(query));
}
 
 
function noEnterCWS(e){
var characterCode
                if(e && e.which){
                e = e;
                characterCode = e.which;
                }
                else{
                e = event;
                characterCode = e.keyCode;
                }            
                 if(characterCode == 13){
                CWS_Search();
                return false;
                }
                else{
                return true;
                }
}
 
function noEnterCIP(e){
var characterCode
                if(e && e.which){
                e = e;
                characterCode = e.which;
                }
                else{
                e = event;
                characterCode = e.keyCode;
                }            
                 if(characterCode == 13){
                CIP_Search();
                return false;
                }
                else{
                return true;
                }
}
 
function CIP_Search(){
//alert('in cip search');
                var searchForm= document.cip_searchform;
 
var finalURL = "";
                if (searchForm.searchtype.value == "news"){
window.location =pt_574.makeAbsoluteURL( strWCIBaseUrl + "/portal/server.pt?space=SearchResult&page=SearchResult&control=searchstart&in_hi_req_apps=4&in_tx_query=" + escape(searchForm.search_field.value) + "&in_hi_req_portletid=" + strNewsPortletID);
                                //window.location = "/portal/server.pt/search?in_tx_query=" + escape(searchForm.q.value) + "&in_hi_req_portletid=" + strNewsPortletID;
                }
 
                if (searchForm.searchtype.value == "glossary"){
window.location =pt_574.makeAbsoluteURL( strWCIBaseUrl + "/portal/server.pt?space=SearchResult&page=SearchResult&control=searchstart&in_hi_req_apps=4&in_tx_query=" + escape(searchForm.search_field.value) + "&in_hi_req_portletid=" + strGlossaryPortletID);
                                //window.location = "/portal/server.pt/search?q=" + escape(searchForm.q.value) + "&in_hi_req_portletid=" + strGlossaryPortletID;
                }
 
                if (searchForm.searchtype.value == "reports"){
                                finalURL = strCIPSearchUrl + "?query=" + escape(searchForm.search_field.value) +  "&domain=REQUESTS&sortby=relevance" ;
                                finalURL = escape(finalURL);
                                OpenSearchScreen(finalURL);
                }
 
                                if (searchForm.searchtype.value == "all"){
 
var randomnumber=Math.floor(Math.random()*10000000001);
var searchresultsurl = strCIPClientGatewayURL + strCIPGatewayBaseUrl + "/cipWeb/search/getSearchResultNumbers.medcoAction" + escape(";jsessionid=" + get_cookie("cip_jsessionid")) + "?query=" + escape(searchForm.search_field.value) + "&rand=" + randomnumber;
 
//var searchresultsurl = strCIPClientGatewayURL + strCIPBaseUrl + "/cipWeb/search/getSearchResultNumbers.medcoAction" + escape(";jsessionid=" + get_cookie("cip_jsessionid")) + "?query=" + escape(searchForm.search_field.value);
 
//get record count for reporst and results from cip search results count url
$.get(searchresultsurl , function(data){
    var cipcount = 0;
    if (data.indexOf('Session') == -1)
    {
    var reptorun = data.indexOf('Report To Run');
    var reptorun1 = data.indexOf('</P>');
    var reptoruncount = data.substring(reptorun + 14,reptorun1).replace(' ','');
 
    var compres = data.indexOf('Completed Results');
    var compres1 = data.indexOf('</P>',reptorun1 + 4);
    var comprescount = data.substring(compres + 18,compres1);
      
    if (parseInt(reptoruncount) > 0)
    {
    finalURL = strCIPSearchUrl + "?query=" + escape(searchForm.search_field.value) +  "&domain=all&sortby=relevance";;
                finalURL = escape(finalURL);
               cipcount = reptoruncount;
                OpenSearchScreen(finalURL);
    }
    else if (parseInt(comprescount) > 0)
    {
        finalURL = strCIPSearchUrl + "?query=" + escape(searchForm.search_field.value) +  "&domain=RESULTS&sortby=relevance";
                finalURL = escape(finalURL);
                cipcount = comprescount;
                OpenSearchScreen(finalURL);
    }
      
    }
 
    if(cipcount == 0)
    {   
    //get news and glossary url..
    var glossaryurl = strWCIBaseUrl + "/portal/server.pt?space=SearchResult&page=SearchResult&control=searchstart&in_hi_req_apps=4&in_tx_query=" + escape(searchForm.search_field.value) + "&in_hi_req_portletid=" + strGlossaryPortletID;
 
   $.get(glossaryurl , function(data){
   var gloss = data.indexOf('<div id="totalresults" style="display:none;">',30000);
   var gloss1 = data.indexOf('</div>',gloss);
   var glosscount = data.substring(gloss + 45,gloss1);
   if (parseInt(glosscount) > 0)
   {
                window.location =pt_574.makeAbsoluteURL( strWCIBaseUrl + "/portal/server.pt?space=SearchResult&page=SearchResult&control=searchstart&in_hi_req_apps=4&in_tx_query=" + escape(searchForm.search_field.value) + "&in_hi_req_portletid=" + strGlossaryPortletID);
   }
   else
   {
                //try to get news count also..
                var newsurl = strWCIBaseUrl + "/portal/server.pt?space=SearchResult&page=SearchResult&control=searchstart&in_hi_req_apps=4&in_tx_query=" + escape(searchForm.search_field.value) + "&in_hi_req_portletid=" + strNewsPortletID;
                $.get(newsurl , function(data){
                var news = data.indexOf('<div id="totalresults" style="display:none;">',30000);
   var news1 = data.indexOf('</div>',news);
   var newscount = data.substring(news + 45, news1);
   if (parseInt(newscount) > 0)
   {
                window.location =pt_574.makeAbsoluteURL( strWCIBaseUrl + "/portal/server.pt?space=SearchResult&page=SearchResult&control=searchstart&in_hi_req_apps=4&in_tx_query=" + escape(searchForm.search_field.value) + "&in_hi_req_portletid=" + strNewsPortletID);
   }
   else
   {
                finalURL = strCIPSearchUrl + "?query=" + escape(searchForm.search_field.value) +  "&domain=all&sortby=relevance";
                finalURL = escape(finalURL);
                OpenSearchScreen(finalURL);
   }
 
})
   }
 
})
   }   
});
 
 
 
//no results found go to default one..
                //finalURL = strCIPSearchUrl + "?query=" + escape(searchForm.q.value) +  "&domain=all&sortby=relevance";
                //finalURL = escape(finalURL);
                //OpenSearchScreen(finalURL);
                               
                }
 
                if (searchForm.searchtype.value == "results"){
                                finalURL = strCIPSearchUrl + "?query=" + escape(searchForm.search_field.value) +  "&domain=RESULTS&sortby=relevance";
                                finalURL = escape(finalURL);
                                OpenSearchScreen(finalURL);
                }
}
 
function OpenSearchScreen(url)
{
                window.location =pt_574.makeAbsoluteURL( strFullScreenGateway  +  strPlumtreeImageserverGatewayUrl  + "/imageserver/plumtree/portal/CWSnew/opener/SearchResults.html?pturl=" + url);
}
 
</SCRIPT>
 
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD>
<DIV id=cws_header_left><IMG id=CW_home border=0 src="https://client.medco.com/imageserver/plumtree/portal/CWSnew/art/trans_image.gif"></DIV></TD>
<TD id=cws_header_center>&nbsp;</TD>
<TD>
<DIV id=cws_header_right><IMG id=Medco_home border=0 src="https://client.medco.com/imageserver/plumtree/portal/CWSnew/art/trans_image.gif">
<DIV id=cws_search_header style="DISPLAY: block">
<FORM id=search name=cws_searchform>
<TABLE id=search_table style="MARGIN-TOP: 36px" align=right>
<TBODY>
<TR>
<TD><INPUT onclick="if(this.value == 'Search') {this.value = ''; }" onkeypress="return noEnterCWS(event)" id=search_field value=Search name=search_field></TD>
<TD><A href="#"><IMG onclick=CWS_Search() id=search_btn border=0 name=search_btn alt=GO src="https://client.medco.com/imageserver/plumtree/portal/CWSnew/art/go_btn.gif"></A></TD></TR></TBODY></TABLE></FORM></DIV><!-- search for CIP search form -->
<DIV id=cip_search_header style="DISPLAY: none">
<FORM id=search name=cip_searchform>
<TABLE id=search_table style="MARGIN-TOP: 36px" align=right>
<TBODY>
<TR>
<TD><INPUT onclick="if(this.value == 'Search') {this.value = ''; }" onkeypress="return noEnterCIP(event)" id=search_field value=Search name=search_field>&nbsp; <SELECT onkeypress="return noEnterCIP(event);" style="FONT-SIZE: 12px" name=searchtype><OPTION selected value=all>All</OPTION><OPTION value=reports>Reports to Run</OPTION><OPTION value=results>Completed Results</OPTION><OPTION value=glossary>Glossary</OPTION><OPTION value=news>News</OPTION></SELECT> </TD>
<TD><A href="#"><IMG onclick=CIP_Search() id=search_btn border=0 name=search_btn alt=GO src="https://client.medco.com/imageserver/plumtree/portal/CWSnew/art/go_btn.gif"></A></TD></TR></TBODY></TABLE></FORM></DIV>
<DIV id=reptoruncount style="DISPLAY: none">0</DIV>
<DIV id=comprescount style="DISPLAY: none">0</DIV>
<DIV id=glosscount style="DISPLAY: none">0</DIV>
<DIV id=newscount style="DISPLAY: none">0</DIV></DIV></TD></TR></TBODY></TABLE>
<SCRIPT>
//alert(PTPortalContext.pageId);
var currpageid = 0;
if (window.location.href.indexOf('/community/') < 0)
                currpageid = get_cookie('MMMCCurrentPageId');
else
                currpageid = PTPortalContext.pageId;
 
 
if (currpageid == intCIPPageID)
{
//show cip search box and hide cws search box..
document.getElementById('cip_search_header').style.display = 'block';
document.getElementById('cws_search_header').style.display = 'none';
}
else
{
//show cws search box and hide cws search box..
document.getElementById('cip_search_header').style.display = 'none';
document.getElementById('cws_search_header').style.display = 'block';
}
 
</SCRIPT>
<!-- Begin Navigation links -->
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD>
<DIV id=nav_holder_left>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD><A href="https://client.medco.com/portal/server.pt/community/home/211"><SPAN id=Home class=nav>Home</SPAN></A></TD>
<TD><A href="https://client.medco.com/portal/server.pt/community/manage_eligibility/212"><SPAN id="Manage Eligibility" class=nav_sel>Manage Eligibility</SPAN></A></TD>
<TD><A href="https://client.medco.com/portal/server.pt/community/reporting/215"><SPAN id=Reporting class=nav>Reporting</SPAN></A></TD>
<TD><A href="https://client.medco.com/portal/server.pt/community/resources/216"><SPAN id=Resources class=nav>Resources</SPAN></A></TD></TR></TBODY></TABLE></DIV></TD>
<TD id=nav_holder_center>&nbsp;</TD>
<TD>
<DIV id=nav_holder_right>
<DIV id=nav_holder_right_blue></DIV></DIV></TD></TR></TBODY></TABLE><!--<div style="background-color:#FFFFFF;">&nbsp;</div>
End Navigation links --><!-- start of main table -->
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD id=center_left>
<DIV></DIV></TD>
<TD id=center_center>
<DIV style="MARGIN-BOTTOM: 0px !important; BACKGROUND-COLOR: #ffffff">
<DIV>
<DIV id=cws_canvas_c360 style="HEIGHT: 25px">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR><!-- <td id="subnav_left"><div></div></td>-->
<TD id=subnav_center class=txtbody><A id=Overview class=no_left href="https://client.medco.com/portal/server.pt/community/manage_eligibility/212/overview/88020">Overview</A> | <A id="E-Service Delivery" class=no_left style="FONT-WEIGHT: bold" href="javascript:OpenFullScreensid('https://client2.medco.com/client/MemberSearch/cas_MSindex.jsp?,CASSID,E-Service Delivery')">E-Service Delivery</A> </TD><!-- <td id="subnav_right"><div></div></td>--></TR></TBODY></TABLE></DIV></DIV>
<SCRIPT type=text/javascript>
 
                // make ajax call then load client div then display message
                                var randomnumber=Math.floor(Math.random()*10000000001);
                                var canvasurl = strContentCanvasGatewayUrl  + get_cookie("MMMCCurrentCommunity") + "_0_43/" +  strContentCanvasUrl + "?rand=" + randomnumber;
                                $('div#cws_canvas_c360').load(canvasurl,function(){
                                //highlight current community page
                                var currpagename1 = '';
                                currpagename1 = get_cookie('MMMCCurrentPageName');
                                currpagename1 = unescape(currpagename1);
                                currpagename1 = currpagename1.replace(/\+/g,' ');
                                if (document.getElementById(currpagename1))
                                {
                                                document.getElementById(currpagename1).style.fontWeight = 'bold';
                                }
                                });
 
function parseURL(url){
    parsed_url = {}
 
    if ( url == null || url.length == 0 )
        return parsed_url;
 
    protocol_i = url.indexOf('://');
    parsed_url.protocol = url.substr(0,protocol_i);
 
    remaining_url = url.substr(protocol_i + 3, url.length);
    domain_i = remaining_url.indexOf('/');
    domain_i = domain_i == -1 ? remaining_url.length - 1 : domain_i;
    parsed_url.domain = remaining_url.substr(0, domain_i);
    parsed_url.path = domain_i == -1 || domain_i + 1 == remaining_url.length ? null : remaining_url.substr(domain_i + 1, remaining_url.length);
 
    domain_parts = parsed_url.domain.split('.');
    switch ( domain_parts.length ){
        case 2:
          parsed_url.subdomain = null;
          parsed_url.host = domain_parts[0];
          parsed_url.tld = domain_parts[1];
          break;
        case 3:
          parsed_url.subdomain = domain_parts[0];
          parsed_url.host = domain_parts[1];
          parsed_url.tld = domain_parts[2];
          break;
        case 4:
          parsed_url.subdomain = domain_parts[0];
          parsed_url.host = domain_parts[1];
          parsed_url.tld = domain_parts[2] + '.' + domain_parts[3];
          break;
    }
 
    parsed_url.parent_domain = parsed_url.host + '.' + parsed_url.tld;
 
    return parsed_url;
}
 
</SCRIPT>
 
<DIV style="FLOAT: left">
<SCRIPT type=text/javascript>
function querySt(ji) {
hu = window.location.search.substring(1);
gy = hu.split("&");
for (i=0;i<gy.length;i++) {
ft = gy[i].split("=");
if (ft[0] == ji) {
return ft[1];
}
}
}
 
var finalurl = unescape(querySt("ptAppURL"));
 
var goodreq = true;
var regex = new RegExp("([0-9A-Za-z\\.@:\/%_+~&#=])$");
 
if ((!regex.test(finalurl) || !((finalurl.indexOf('http://')==0) || (finalurl.indexOf('https://')==0)))) {
                goodreq = false;
}
 
var parentdomain = parseURL(finalurl).parent_domain;
 
if (parentdomain.toLowerCase()=='medco.com' && goodreq == true)
{
document.write("<iframe id='PortalHidden'  name='PortalHidden'  allowtransparency='true' style='width:0px; height:0px; border: 0px; visibility:hidden'  src='blank.html'></iframe>");
if (navigator.appName.indexOf('Netscape') != -1)
{             
                document.body.style.overflow = "hidden";
                document.write("<IFRAME NAME='appFrame' ID='appFrame' src='" + finalurl + "' width='90%' height='300%' style='top:0; right: 0; left: 0; WIDTH:100%; SCROLLING:AUTO ' frameborder='0' ></iframe>");
}
else
{
                document.write("<IFRAME NAME='appFrame' ID='appFrame' src='" + finalurl + "' style='top:0; right: 0; left: 0; WIDTH:100%; HEIGHT:80%; SCROLLING:AUTO ' frameborder='0' ></iframe>");
                document.getElementById('appFrame').style.height = document.body.clientHeight - 161;
}
 
document.write("<IFRAME NAME='portalehcmgmt' ID='portalehcmgmt' allowtransparency='true' style='width:0px; height:0px; border: 0px;' src='" + strehcmgtCIPurl + "'></iframe>");
}
else
{
                alert('You are allowed to access websites in medco.com domain only.');
}
</SCRIPT>
<IFRAME id=PortalHidden style="BORDER-TOP: 0px; HEIGHT: 0px; BORDER-RIGHT: 0px; WIDTH: 0px; BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; VISIBILITY: hidden" src="blank.html" allowTransparency name=PortalHidden></IFRAME><IFRAME id=appFrame style="HEIGHT: 776px; WIDTH: 100%; RIGHT: 0px; LEFT: 0px; TOP: 0px; SCROLLING: AUTO" src="https://client2.medco.com/client/MemberSearch/cas_MSindex.jsp?BV_SessionID=@@@@1960320940.1485278537@@@@&BV_EngineID=cceeadglifgdklkcfklcgffdhhfdffl.0" frameBorder=0 name=appFrame></IFRAME><IFRAME id=portalehcmgmt style="BORDER-TOP: 0px; HEIGHT: 0px; BORDER-RIGHT: 0px; WIDTH: 0px; BORDER-BOTTOM: 0px; BORDER-LEFT: 0px" src="https://client.medco.com/imageserver/enhancedsmgmt/index.html" allowTransparency name=portalehcmgmt></IFRAME></DIV></DIV></TD>
<TD id=center_right>
<DIV></DIV></TD></TR></TBODY></TABLE>
<DIV>
<STYLE type=text/css>#footer {
                MARGIN-BOTTOM: 20px
}
#footer_left {
                HEIGHT: 71px; WIDTH: 25px; BACKGROUND-IMAGE: url(https://client.medco.com/imageserver/plumtree/portal/CWSnew/art/footer_left.png); BACKGROUND-REPEAT: repeat-y
}
#footer_left DIV {
                WIDTH: 25px
}
* HTML #footer_left {
                BACKGROUND: none transparent scroll repeat 0% 0%; FILTER: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://client.medco.com/imageserver/plumtree/portal/CWSnew/art/footer_left.png',sizingMethod='scale')
}
#footer_center {
                HEIGHT: 71px; WIDTH: 100%; BACKGROUND-IMAGE: url(https://client.medco.com/imageserver/plumtree/portal/CWSnew/art/footer_center.png); BACKGROUND-REPEAT: repeat-x
}
* HTML #footer_center {
                BACKGROUND: none transparent scroll repeat 0% 0%; FILTER: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://client.medco.com/imageserver/plumtree/portal/CWSnew/art/footer_center.png',sizingMethod='scale')
}
#footer_right {
                WIDTH: 18px; BACKGROUND-IMAGE: url(https://client.medco.com/imageserver/plumtree/portal/CWSnew/art/footer_right.png); BACKGROUND-REPEAT: repeat-y
}
#footer_right DIV {
                HEIGHT: 71px; WIDTH: 18px
}
* HTML #footer_right {
                BACKGROUND: none transparent scroll repeat 0% 0%; FILTER: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://client.medco.com/imageserver/plumtree/portal/CWSnew/art/footer_right.png',sizingMethod='scale')
}
</STYLE>
 
<SCRIPT language=JavaScript>
function launchWin(theURL,name,features) { //v2.0
  window.open(pt_573.makeAbsoluteURL(theURL),name,features);
}
   
function open_privacy (){
                var finalurl = strImageServerExternalUrl + "/imageserver/plumtree/portal/CWSnew/pagelayouts/privacy.html";
                var helpwin = window.open(pt_573.makeAbsoluteURL(finalurl ), "psl","height=425,width=625,resizable=yes,scrollbars");
                if (helpwin.opener == null) // if something went wrong
                                helpwin.opener = window;                       
                helpwin.opener.name = "homewin";
                helpwin.focus();
                }                                 
               
function open_termsofuse(){
                var finalurl = strImageServerExternalUrl + "/imageserver/plumtree/portal/CWSnew/pagelayouts/terms_of_use.html";
                var helpwin = window.open(pt_573.makeAbsoluteURL(finalurl ), "psl","height=425,width=625,resizable=yes,scrollbars");
                if (helpwin.opener == null) // if something went wrong
                helpwin.opener = window;
                   
                helpwin.opener.name = "homewin";
                helpwin.focus();
   }
 
//on document ready hide footer for full screen pages..
$(document).ready(function(){
if  (document.location.href.indexOf("/opener/") > 0)
                document.getElementById('cws_footer').style.display = 'none';
               
//avoid showing WCI login screen for portal ..
if (document.getElementById('pt-login-username-textbox') != null)
                window.location =pt_573.makeAbsoluteURL( strWCIBaseUrl + "/CWSCommonService/Login.do?error=portal_user_doesnot_exist");
});
</SCRIPT>
<!--START:FOOTER-->
<DIV id=cws_footer style="DISPLAY: none">
<TABLE id=footer cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD id=footer_left>
<DIV></DIV></TD>
<TD id=footer_center vAlign=top>
<DIV id=footer_links><A href="javascript:launchWin(strImageServerExternalUrl + '/imageserver/plumtree/portal/CWSnew/pagelayouts/privacy.html','privacy','width=769,height=657');">Privacy</A>&nbsp;&nbsp;|&nbsp;&nbsp; <A href="javascript:launchWin(strImageServerExternalUrl + '/imageserver/plumtree/portal/CWSnew/pagelayouts/terms_of_use.html','terms_of_use','width=769,height=657');">Terms of Use</A></DIV><SPAN id=copyright><BR>© 2016 Express Scripts Holding Company. All Rights Reserved. </SPAN></TD>
<TD id=footer_right>
<DIV></DIV></TD></TR></TBODY></TABLE></DIV><!--END:FOOTER--></DIV>
<SCRIPT type=text/javascript>
 
if (document.location.href.indexOf("/opener/") != -1)
{
                document.body.style.overflow = "hidden";
}
 
function open_glossary ()
                                {
                                var finalurl = strGlossaryUrl;
                               
                                var glosswin = window.open(pt_335.transformURL(finalurl), "gloss","height=440,width=465,toolbar=0,scrollbars=0,resizable=0");
                                                if (glosswin.opener == null) // if something went wrong
                                                glosswin.opener = window;
                                                glosswin.opener.name = "glosswin";
                                                glosswin.focus();
                                }
function open_contactus()
{
                var helpwin_height=(screen.height-550)/2;
                var helpwin_width=(screen.width-500)/2;
                var helpwin_specs ='height='+550+',';
                helpwin_specs +='width='+500+',';
                helpwin_specs +='top='+helpwin_height+',';
                helpwin_specs +='left='+helpwin_width+',';
                helpwin_specs +='resizable=yes'+',';
                var strcontactusurl = strcontactus + "&" + get_cookie('CRLSID');
                //var strcontactusurl = strcontactus;
                var helpwin_popup = window.open(pt_335.transformURL(strcontactusurl),"psl",helpwin_specs);
               
                helpwin_popup.focus();
 
}
 
function doLogOut_old()
{
                if(confirm("Are you sure you want to log out?"))
                                                top.location.replace(strLogoutUrl);
                                                }
 
function doLogOut()
{                             
                if(confirm("Are you sure you want to log out?")){
                                if( window.name == "Coverage360"){                                   
                                                C360win.close();                                              
                                                window.name="";
                                }
                                if (get_cookie("OAMCWS")!=null && get_cookie("OAMCWS")!="")
                                                top.location.replace(strOAMLogoutUrl);
                                else       
                                                top.location.replace(strLogoutUrl);
                }
}
</SCRIPT>
 
<SCRIPT type=text/javascript>
var currenturl = document.location.href;
                if (currenturl.indexOf("community") > 0)
                {             
                                document.cookie = 'MMMCCurrentCommunity=' + PTPortalContext.commId + ' ; path=/' + ' ; domain=medco.com';
                                document.cookie = 'MMMCCurrentCommunityName=' + 'Manage Eligibility'.replace(' ','_') + ' ; path=/' + ' ; domain=medco.com';
                                document.cookie = 'MMMCCurrentPageName=' + PTPortalContext.pageName + ' ; path=/' + ' ; domain=medco.com';
                                document.cookie = 'MMMCCurrentPageId=' + PTPortalContext.pageId + ' ; path=/' + ' ; domain=medco.com';
       }
 
 
//highlight current community page
var currcommpage = '';
var currpagename = '';
if (currenturl.indexOf("community") > 0)
   {
                currcommpage = 'Manage Eligibility';
                currpagename = PTPortalContext.pageName;
                currpagename = unescape(currpagename);
                currpagename = currpagename.replace(/\+/g,' ');
   }
else
   {
                currcommpage = get_cookie('MMMCCurrentCommunityName').replace('_',' ');
                currpagename = get_cookie('MMMCCurrentPageName');
                currpagename = unescape(currpagename);
                currpagename = currpagename.replace(/\+/g,' ');
   }
 
if (document.getElementById(currcommpage))
{
                document.getElementById(currcommpage).className = 'nav_sel';
}
 
if (document.getElementById(currpagename))
{
                document.getElementById(currpagename).style.fontWeight = 'bold';
}
 
</SCRIPT>
 
<SCRIPT type=text/javascript>InitializeEvents();</SCRIPT>
</BODY></HTML>
Here is ahk code. Right. Now it's just message boxes and also includes the IEGET function that I've been using and haven't had an issues with.

Code: Select all

Msgbox % IsObject(wb.document.parentwindow.frames("appFrame").frames("content")) ; Returns a 1 If I add .document or anything after the last frame I get 0.
 
 
frame := ComObject(9, ComObjQuery(wb.document.("appFrame").contentwindow.frames("content"),"{332C4425-26CB-11D0-B483-00C04FD90119}","{332C4425-26CB-11D0-B483-00C04FD90119}"), 1)
                                                                               
Msgbox % IsObject(frame) ; Returns a 1 as well
 
Msgbox % frame.document.getElementsByTagName("div")[A_Index - 1].innertext ; returns nothing. This is all done inside a loop. I've tried changing it from Div to something else, but still nothing.
 
 
 
IEGet(Name="", HwndFilter="") {
                if (Name = "")    ;// Get active window name if no parameter
                                WinGetTitle, Name, % "ahk_id" HwndFilter:=WinExist("ahk_class IEFrame")
                else if (HwndFilter="A" or HwndFilter="Active")
                                WinGet, HwndFilter, ID, ahk_class IEFrame
                IfInString, Name, provided by Blue Cross Blue Shield of MN
                                {
                                Name := (Name="New Tab - Windows Internet Explorer")? "about:Tabs" : RegExReplace( Name, " - (Windows|Microsoft) (Internet Explorer|Internet Explorer.*$) provided by Blue Cross Blue Shield of MN" )
                                }
                Else
                                {
                                Name := (Name="New Tab - Windows Internet Explorer")? "about:Tabs" : RegExReplace( Name, " - (Windows|Microsoft) (Internet Explorer|Internet Explorer.*$)" )
                                }
                for wb in ComObjCreate("Shell.Application").Windows
                                If ( wb.LocationName = Name ) && InStr( wb.FullName, "IEXPLORE.EXE" ) || ( wb.LocationName . " - Internet Explorer" = Name) && InStr( wb.FullName, "IEXPLORE.EXE" ) ||
                                                if Not HwndFilter or (HwndFilter and wb.hwnd=HwndFilter)
                                                                return wb
}

Any help would be greatly appreciated as I'm at a lost currently
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: IE iframe and frame

26 Jan 2017, 00:23

one example script that I use in case that helps:

Code: Select all

;WBGet function - AutoHotkey Community
;https://autohotkey.com/boards/viewtopic.php?f=6&t=39869

q:: ;a script to click the 'Load more comments' button on a Disqus frame on a Blogspot post
WinGet, hWnd, ID, A
oWB := WBGet("ahk_id " hWnd)
vNum := "dsq-app1"
;IID_IHTMLWindow2 := "{332C4427-26CB-11D0-B483-00C04FD90119}"
;VT_DISPATCH := 9
oDoc := ComObject(9, ComObjQuery(oWB.Document.ParentWindow.Frames[vNum], "{332C4427-26CB-11D0-B483-00C04FD90119}", "{332C4427-26CB-11D0-B483-00C04FD90119}"), 1).Document.DocumentElement
vEltClass := "btn load-more__button"
oDoc.getElementsByClassName(vEltClass).item[0].click()
oWB := oDoc := ""
return
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
hrvoje83
Posts: 45
Joined: 01 Mar 2017, 10:37

Re: IE iframe and frame

31 Jan 2018, 03:53

Hi jeeswg,

Thank you for your post on my Acc question bellow, but there was no luck with WinGet, the same result "nothing", so I am changing my code to IFrame.

https://autohotkey.com/boards/viewtopic.php?f=5&t=37563

Ok, this is my screenshot of the iWB Learner, can you please help me with the code?
I want get Innertext.
Capture2.PNG
Capture2.PNG (13.74 KiB) Viewed 6954 times
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: IE iframe and frame

31 Jan 2018, 05:59

- I don't do too much with IFrames, the following code may work, if not, you could try uncommenting some of the 'could try this also' lines, or trying the links I mentioned here:
active accessibility get value - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=37563
- I provided a link to the WBGet function.

Code: Select all

q:: ;internet explorer - get element text from element in IFrame (untested)
;WBGet function - AutoHotkey Community
;https://autohotkey.com/boards/viewtopic.php?f=6&t=39869

WinGet, hWnd, ID, A
oWB := WBGet("ahk_id " hWnd)
;IID_IHTMLWindow2 := "{332C4427-26CB-11D0-B483-00C04FD90119}"
;VT_DISPATCH := 9
vNum := "contentIFrame1"
;vNum := 0 ;could try this also
;vNum := 1 ;could try this also
oDoc := ComObject(9, ComObjQuery(oWB.Document.ParentWindow.Frames[vNum], "{332C4427-26CB-11D0-B483-00C04FD90119}", "{332C4427-26CB-11D0-B483-00C04FD90119}"), 1).Document.DocumentElement
;oDoc := ComObject(9, ComObjQuery(oWB.Document.ParentWindow.Frames[vNum], "{332C4427-26CB-11D0-B483-00C04FD90119}", "{332C4427-26CB-11D0-B483-00C04FD90119}"), 1).Document ;could try this also
oElt := oDoc.getElementById("OIB_label")
MsgBox, % oElt.innerText
MsgBox, % oElt.outerHTML
oWB := oDoc := oElt := ""
return
Last edited by jeeswg on 31 Jan 2018, 12:02, edited 2 times in total.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Crashm87
Posts: 48
Joined: 25 Jul 2016, 13:12

Re: IE iframe and frame

31 Jan 2018, 09:24

I have a website with multiple frames and had many issues getting into it. After extensive forum search and alot of help, these 2 snippets of code are what work for me.

Code: Select all

IEGet(name="")
 {
	IfEqual, Name,, WinGetTitle, Name, ahk_class IEFrame     ;// Get active window if no parameter
	Name := (Name="New Tab - Windows Internet Explorer")? "about:Tabs":RegExReplace(Name, " - (Windows|Microsoft)? ?Internet Explorer$")
	for wb in ComObjCreate("Shell.Application").Windows()
		if wb.LocationName=Name and InStr(wb.FullName, "iexplore.exe")
			return wb
}
And to get into frame

Code: Select all

getframe:
{
	wb := IEGet()
	try myFrame := wb.document.parentWindow.frames[1].document
	catch {
		myFrame := ComObj(9,ComObjQuery(wb.document.All("main").contentwindow,"{332C4427-26CB-11D0-B483-00C04FD90119}","{332C4427-26CB-11D0-B483-00C04FD90119}"),1).document
	}
	myFrame := myFrame.parentWindow.frames[0].document
	return
}
Then when I need to do something to an element, I call both.
This is a quick test to an element on my page (A[12]), if message box shows me innerHTML, i know i'm in the frame

Code: Select all

wb:= IEGet()
gosub getframe
test := myFrame.querySelectorAll("a")[12].innerHTML
msgbox % test
These may be crude code, but it worked for me and I've been rolling with it since. :dance:
hrvoje83
Posts: 45
Joined: 01 Mar 2017, 10:37

Re: IE iframe and frame

31 Jan 2018, 09:57

Hi Crashm87,

Can you please translate that in one code and help me with my example.

My latest success is innertext of the whole page.

I know I can extract them with string functions, but I wannt use IFrame like COM, because I see that some of you is successuful with that.
User avatar
Xeo786
Posts: 760
Joined: 09 Nov 2015, 02:43
Location: Karachi, Pakistan

Re: IE iframe and frame

01 Feb 2018, 07:14

this is how you can catch to document , via iframe contentwindow

Code: Select all

wb.document.all.tags("IFRAME")[0].contentWindow.document.getElementById("C18FormEEXDNO1").InnerText 
"When there is no gravity, there is absolute vacuum and light travel with no time" -Game changer theory
hrvoje83
Posts: 45
Joined: 01 Mar 2017, 10:37

Re: IE iframe and frame

05 Feb 2018, 03:59

Hi jeeswg,

Thank you a lot, here is the right code.

Code: Select all

WinActivate, ahk_class IEFrame
WinGet, hWnd, ID, A
oWB := WBGet("ahk_id " hWnd)
vNum := "contentIFrame1"
oDoc := ComObject(9, ComObjQuery(oWB.Document.ParentWindow.Frames[vNum], "{332C4427-26CB-11D0-B483-00C04FD90119}", "{332C4427-26CB-11D0-B483-00C04FD90119}"), 1).Document
oElt := oDoc.getElementById("OIB_label")
MsgBox, % oElt.innerText
MsgBox, % oElt.outerHTML
oWB := oDoc := oElt := ""
return
blue83
Posts: 157
Joined: 11 Apr 2018, 06:38

Re: IE iframe and frame

15 May 2018, 05:42

Hi,

Does anybody knows how to get this above "vNum := "contentIFrame1"", because in IE in my case it is always changing even if I am in same position in IE.

Sometimes is contentIFrame1, or contentIFrame0 or contentIFrame2,...

Thanks

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 188 guests