.個朲綉√ 发表于 2011-9-1 23:48:29

如何让GUI内嵌的IE登陆后跳转弹出的新页面还在此GUI内?

本帖最后由 .個朲綉√ 于 2011-9-4 01:07 编辑

   

利用Google搜索本坛   GUI IE 跳转 site:www.autoitx.com
竟然没有一条相关的资料,莫非我是第一个遇到此问题的?那只好我来提问一下试试。
我想在一个GUI里内嵌一个IE窗口,可是这个最终页面是需要登陆后才能继续。
但是登陆后,就会弹出一个跳转关闭窗口的提示(如上图)
然后跳转的新页面在IE浏览器中打开了,脱离了GUI框架,不知道有什么办法让内嵌的IE始终在GUI框架内?

下面这是论坛几个高人研究的成果,测试对我这种问题无效:
http://www.autoitx.com/forum.php?mod=viewthread&tid=16723&fromuid=7634991

.個朲綉√ 发表于 2011-9-2 09:45:12

貌似这个问题无解?或者太简单了么?自己在琢磨一下吧,等搞定了,自己来解答。

cxlater 发表于 2011-9-2 11:38:41

把你需要登录的页面地址发一下
需要修改html

楼上风云 发表于 2011-9-2 11:48:40

坛内已有类似帖了,记得是P版的,利用搜索吧,IE   框架弹窗

cxlater 发表于 2011-9-2 11:52:32

修改A标签的 target属性

.個朲綉√ 发表于 2011-9-3 14:20:10

把你需要登录的页面地址发一下
需要修改html
cxlater 发表于 2011-9-2 11:38 http://www.autoitx.com/images/common/back.gif


    页面地址发不了,发一下源码,估计倒是可以。。。

.個朲綉√ 发表于 2011-9-3 14:34:17

发一下网页的源码吧,大家帮忙看一下
<html>
<head>   
    <meta http-equiv="Cache-Control" content="no-store" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <meta name="generator" content="aisso 1.0" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>登录</title>
    <link type="text/css" rel="stylesheet" href="/cas/css/sytle_public_skin.css" />
    <script type="text/javascript" src="js/common_rosters.js"></script>
   
    <script type="text/javascript" src="js/jquery-1.2.6.js"></script>
    <script type="text/javascript" src="js/ui/jquery.table.hover.js"></script>

    <script language="javascript">
      function setLoginFormFocus() {
            if ( document.getElementsByName("operatorId").length>0 ){
            document.getElementsByName("operatorId").checked=true;
            }
            document.loginForm.loginPwd.focus();
      }

      function submitForm(){
            if(loginForm._eventId.value=="cancel"){
                return true;
            }
      
            if(loginForm.loginPwd.value=="") {
                alert("请输入操作密码!");
                return false;
            }
            var paObj=loginForm.loginPwd;
              //paObj.value=paObj.value.toLowerCase();
            //loginForm.submitNext.disabled = true ;
            document.getElementById("submitNext").disabled = true;
            loginForm._eventId.value="submit";
            return true;
      }

      function cancelForm(){
            loginForm._eventId.value="cancel";
            document.getElementById("submitCancel").disabled = true;
            //loginForm.submitCancel.disabled = true ;
            loginForm.submit() ;
            return true;
      }

      //如果只有一个操作员,直接下一步
      /*
      $(document).ready(function(){
            var operNum=$("input").size();
            alert(operNum);
            if(operNum==1){
                $("#submitNext").click();
            }
      });*/
    </script>
</head>
<body style="text-align: center;" onload="setLoginFormFocus();">
    <div id="page">
   <br>
   <br>
   <br>
<form id="loginForm" name="loginForm" class="fm-v clearfix" action="/cas/login?service=http%3A%2F%2Fboss.shcnc.com%3A15011%2Funibss" method="post" onsubmit="return submitForm()">
                                       
   <div id="location" style="text-align: left;">您所在的位置: 登录 &gt; 选择操作员工号</div>
      
      <div id="content">
            <table width="100%"border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td>登录号:</td>
                <td>USER</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td>防伪信息:</td>
                <td>BSS_v_3.0</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td>最后登录信息:</td>
                <td>2011-09-03 14:22:23 134.64.2.10 </td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
            <!--
            <tr>
                <td>距离密码过期天数:</td>
                <td>-790</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
               -->
            
            <tr
            
            >
                <td >是否双屏:</td>
                <td >
                <input type="radio" name="asHelp" value=1 />是 <input type="radio" name="asHelp" value=0 checked />否
                </td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
            
            
            
            
            <tr>
                <td>操作密码:</td>
                <td>
               <input name="loginPwd" type="password" size="20" style="border: 1 solid #999999;" value="" tabindex="1">
                </td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
            

            <tr>
                <td colspan="6" align="center" style="text-align: center;">
                  <input type="hidden" name="lt" value="_c1BFBE8D1-920B-1688-30E9-1858F7026DD2_kF5FB6294-9CE0-CF49-F344-A86A57EED824" />
                  <input type="hidden" name="_eventId" value="submit" />
                  <input id="submitNext" type="submit" class="Button" value="下一步" name="_eventId_submit" tabindex="2">
                  <input id="submitCancel" type="submit" class="Button" value="返回" name="_eventId_cancel" tabindex="3" onclick="cancelForm();">
                </td>
            </tr>
            </table>
      </div>


      <div id="missionTable">
      <table style="width: 100%" class="result">
            <tr>
                <th>选择</th>
                <!--th>子系统</th-->
                <th>工号编码</th>
                <th>机构编码</th>
                <th>机构名称</th>
                <!--th>备注</th-->
            </tr>
   
            
            <tr>
                <td align="center">
                  <input type="radio" name="operatorId" id="optorinfo" value="USER">
                </td>
                <!--td>
                  
                </td-->
                <td>
                  USER
                </td>
                <td>
                  A07
                </td>
                <td>
                  闵行分公司
                </td>
                <!--td>
                </td-->
            </tr>
            
      </table>
      </div>
</form>
    </div>

<script>
//系统初始化
$(function(){
    $('.result').table();
});
</script>

</body>
</html>

.個朲綉√ 发表于 2011-9-4 01:08:42

难道Au3真的就解决不了这样的问题吗?真的不相信。。。

.個朲綉√ 发表于 2011-9-4 10:08:18

我用HttpWatch查到了弹窗的网页源码,发上来大家看看,看怎么入手解决这个问题。HTTP/1.1 200 OK
Date: Sun, 04 Sep 2011 01:00:29 GMT
Server: Apache/2.2.15 (Unix)
Accept-Ranges: bytes
Content-Length: 2018
Last-Modified: Tue, 30 Aug 2011 16:58:56 GMT
P3P: CP=CAO PSA OUR
X-Powered-By: Servlet/2.5 JSP/2.1
Keep-Alive: timeout=5, max=97
Connection: Keep-Alive
Content-Type: text/html

<!-- add by yq -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
    <head>
      <!-- META HTTP-EQUIV="Refresh"

CONTENT="0;URL=/unibss/loginAction.go"-->
    </head>

    <body>
      <h3>
            Loading.............
      </h3>
      <script language="javascript"

type="text/javascript">
              <!--
              //取随机数作为窗口名称
                      function getRndNum(lbound,ubound) {
                          return (Math.floor

(Math.random()*(ubound-lbound)+lbound));
                      }

                      function getResult(n) {
                     var str="qwertyuiopasdfghjklmnbvcxz1234567890";
             

       var sp_str=str.split("");
                     var rnd="";
                     for (var i=0;i<n ;i++ )
                       {
                        rnd+=sp_str[getRndNum

(1,36)];
                     }
                        return rnd;
                      }
                           //-->
            function full_window(){
            try{
      

              var windowOldName=top.window.name;
                    var frameWindowName="";
                    if(windowOldName.indexOf("frameWindowName_")==0){
      

                       frameWindowName=windowOldName;
                    }else{
                            frameWindowName="frameWindowName_"+getResult(10);
                    }
      

         newwindow=window.open ("/unibss/loginAction.go", frameWindowName, "toolbar=no, menubar=no, scroll=auto ,resizable=no, location=no, status=yes")
                   

newwindow.moveTo(0,0);
                    newwindow.resizeTo(screen.width,screen.height-3);
                   
                    try{
                    newwindow.focus();
      

              if(frameWindowName!=windowOldName){//避免反复登录时关闭所有窗口
                            window.close();
                    }
                    }catch(e){;}
   

          }catch(e){;}
            
            }
                        try{//这里要捕获一下异常,因为在crm1/crm2互相包含的框架页面里面可能会出js错误
            if

(top.location != self.location){
               top.location=self.location;
               window.location.reload();
            }
            full_window();
            

}catch(e){;}
            
      </script>
    </body>
</html>
页: [1]
查看完整版本: 如何让GUI内嵌的IE登陆后跳转弹出的新页面还在此GUI内?