javascript - Iframe how to use parent iframe -


 have  2 html pages follows 

main.html

<html>      <head>          <meta http-equiv="content-type" content="text/html; charset=utf-8">          <link href="resources/css/ext-all.css" rel="stylesheet" type="text/css"/>          <script type="text/javascript" src="extjs4.0.7/ext-all-debug.js"></script>          <script type="text/javascript" src="extjs4.0.7/ext-all.js"></script>        </head>      <body>          <iframe src="child.html" width="50%" heght="50%"/>      </body>  </html>

i have use 'extjs4.0.7/ext-all-debug.js' , 'extjs4.0.7/ext-all.js' in child.html create button follows child.html:

<html>      <head>          <meta http-equiv="content-type" content="text/html; charset=utf-8">          <title>jsp page</title>              <script>              parent.ext.onready(function(){                  parent.ext.msg.alert('status', 'changes saved successfully.');                      var container=parent.ext.create('parent.ext.container', {                          renderto:window.parent.ext.getbody(),                          items   : [                              {                                  xtype: 'button',                                  text : 'my button'                              }                          ]                        });                      parent.tosource();                    });              <%--alert("hello world");--%>              <%--parent.ext.msg.alert('status', 'changes saved successfully.');--%>            </script>      </head>      <body>          <h1>hello world!</h1>      </body>  </html>

i have use javascript files loaded "main.html" in "child.html" without loading in child.html i.e child.html should not contain importing javascript tags


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -