PDA

View Full Version : [CLOSED] Window Help



Timothy
Oct 22, 2008, 7:10 PM
Hello,

With the following example, I would like to know how I can make an ExtJS Window take over the parent page and not just the iframe? Wondering if this is possible?

Example.aspx:


<%@ Page Language="C#" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Example</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True" />
<ext:ScriptManager ID="ScriptManager2" runat="server" StateProvider="PostBack" />
<ext:Panel ID="Panel1"
runat="server"
AutoLoadIFrame="Example-Frame.aspx"
Height="400"
Width="600" />
</form>
</body>
</html>


Example-Frame.aspx:


<%@ Page Language="C#" %>
<%@ Register assembly="Coolite.Ext.Web" namespace="Coolite.Ext.Web" tagprefix="ext" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Example</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server" EnablePartialRendering="True" />
<ext:ScriptManager runat="server" />
<ext:Window runat="server"
AutoLoad="http://www.google.com"
Modal="True"
Show&#111;nload="True"
Height="300"
Width="400" />
</form>
</body>
</html>


Cheers,
Timothy

geoffrey.mcgill
Oct 23, 2008, 9:32 AM
Hi Timothy,

Any chance you could define the Window in the Parent page? If you show a Model Window within an <iframe>, only the size of the <iframe> will be masked and a Window defined within the <iframe> can not "escape".

Timothy
Oct 23, 2008, 9:36 AM
Sure, can you provide me with an example of how I could manipulate the Window in the parent from the iframe then?

Cheers,
Timothy

geoffrey.mcgill
Oct 23, 2008, 10:05 AM
Hi Timothy,

The following forum thread details how to get an instance of another control/DOMobject from an <iframe>, see http://forums.ext.net/showthread.php?threadid=2138-16-1.aspx


Hope this helps.

Timothy
Oct 23, 2008, 10:16 AM
geoffrey.mcgill (10/23/2008)Hi Timothy,

The following forum thread details how to get an instance of another control/DOMobject from an <iframe>, see http://forums.ext.net/showthread.php?threadid=2138-16-1.aspx


Hope this helps.




Are you using examples of my previous answers to answer my own question? Tsk!

I figured I would have to use the DOM directly, just wanted to make sure ;)

Cheers,
Timothy

geoffrey.mcgill
Oct 23, 2008, 10:28 AM
Ha... you're right. I didn't even notice. Sorry about that!

Yes, there's really very little difference between manipulating a control that is on the current page or another parent window. If the dom object resides in another browser window (or iframe) you just need to prefix the reference to the dom object (or toolkit controls .ClientID) with the browser window specifier.

Once you have an instance of the dom object it's bussiness as usual.

Accessing an object within a parent from a child <iframe> would be parent.&#100;ocument.[ClientID].

Example


parent.&#100;ocument.Window1.getBody().update('Hello World');

Timothy
Oct 23, 2008, 10:32 AM
Cool snuff, I'll work with manipulating the dom at this point.

Cheers for the response,
Timothy