EXT--弹出的Window中嵌入iframe

开发者博客www.developsearch.com

 

<!-- vim: ts=2:sw=2:nu:fdc=2:spell
 
Handling Item Clicks
 
@author    Ing.Jozef Sakáloš
@copyright (c) 2009, by Ing. Jozef Sakáloš
@date      4. February 2008
@version   $Id: itemclick.html 138 2009-03-20 21:22:35Z jozo $
 
@license itemclick.html is licensed under the terms of the Open Source
LGPL 3.0 license. Commercial use is permitted to the extent that the 
code/component(s) do NOT become part of another Open Source or Commercially
licensed development library or toolkit without explicit permission.
 
License details: http://www.gnu.org/licenses/lgpl.html
-->
 
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <link rel="stylesheet" type="text/css" href="/ext-2.21/resources/css/ext-all.css">
  <link id="theme" rel="stylesheet" type="text/css" href="../css/empty.css">
  <link rel="stylesheet" type="text/css" href="../css/icons.css">
  <link rel="stylesheet" type="text/css" href="../css/itemclick.css">
  <link rel="shortcut icon" href="../img/extjs.ico">
  <script type="text/javascript" src="/ext-2.21/adapter/ext/ext-base.js"></script>
  <script type="text/javascript" src="/ext-2.21/ext-all-debug.js"></script>
  <script type="text/javascript" src="iframewindow.js"></script>
  <title id="page-title">iFrame Window Power By Fatjames</title>
</head>
<body>  <!-- ad start can delete-->
  <div id="alimama" style="margin:4px">
	   <script type="text/JavaScript"> 
        alimama_pid="mm_11066753_1028244_2666449"; 
        alimama_titlecolor="0000FF"; 
        alimama_descolor ="000000"; 
        alimama_bgcolor="FFFFFF"; 
        alimama_bordercolor="E6E6E6"; 
        alimama_linkcolor="008000"; 
        alimama_bottomcolor="FFFFFF"; 
        alimama_anglesize="0"; 
        alimama_bgpic="0"; 
        alimama_icon="0"; 
        alimama_sizecode="11"; 
        alimama_width=760; 
        alimama_height=90; 
        alimama_type=2; 
        </script> 
        <script src="http://a.alimama.cn/inf.js" type=text/javascript> 
        </script>
	</div>
  <!-- ad end can delete-->
<div id="remarks" style="margin:4px">
  <H3>弹出的 Window 中嵌入 iframe</H3>
                      <p>这个例子告诉我们如何在window中嵌入一个iframe.. </p>
                      <p>一般应用在需要调用第三方页面的时候.如调用通用的上传文件功能.</p>
                      <p>另外还可以在自己的网站上显示另外一个网站的新闻/图片.(这招还是不要用得太多..)</p>
</div>
        </body>
</html>
<!-- eof -->

 

 

 

iframewindow.js

 

 

/**
 * Iframe window
 *
 * @author    Fatjames
 * @copyright (c) 2009, by Fatjames & extjs.org.cn
 * @date      4. April 2009
 *
 * LGPL 3.0 license. Commercial use is permitted to the extent that the 
 * License details: http://www.gnu.org/licenses/lgpl.html
 */
 
 
Ext.BLANK_IMAGE_URL = '/ext-2.21/resources/images/default/s.gif';
 
// application main entry point
Ext.onReady(function() {

	var win = new Ext.Window({
		 title:Ext.fly('page-title').dom.innerHTML
		,id:'win'
		,width:640
		,height:480
		,closable:true
		,resizable:true
		,minimizable:true
		,maximizable:true
		,html: "<iframe src='http://extjs.org.cn/' style='width:100%; height:100%;'></iframe>"
		
	});

	win.show();
 
}); // eo function onReady

 

 开发者博客www.developsearch.com

 

 

 

你可能感兴趣的:(ext)