How to use ext:Window to open new aspx page?
*NEW - Coolite Toolkit Version 0.7 now available for DOWNLOAD. See also Examples Explorer.
 

Coolite Forums

Welcome Guest ( Login | Register )
 
How to use ext:Window to open new aspx page?
Subscribe
Last Login: Today @ 2:56:18 PM
Posts: 234,
Posted 7/24/2008 6:41:56 AM

Group: Coolite Premium Member & Early Adopter
  On a button click in my main page, I want to pop open a new dialog
aspx page inside an ext:window.  I set the Window's autoload property
but it seems like the dialog page is loaded when the main page is
loaded.  Is there a way to load the aspx page inside the Window only
when the Window is shown?  I would also like to add parameters to the
url of the dialog aspx page before it is shown. 

Last Login: 9/1/2008 3:29:41 AM
Posts: 10,
Posted 7/27/2008 12:42:09 AM

Group: Coolite Early Adopter
jchau,

If you want it to be done on the client side (i.e. using javascript), call the load function on the ext window, like:


Ext.get('windowId').load({
    url: 'SomePage.aspx',
    scripts: false // set this to true if there is any javascript
                   // on the target page that you would
                   // want to be executed
});


or if you want to do this through server side code, you have again the Load method of the ext:window control in which you'll have to pass in a LoadConfig object. e.g.:


protected void Button1_Click(object sender, EventArgs e)
{
      Coolite.Ext.Web.LoadConfig config = new Coolite.Ext.Web.LoadConfig("SomePage.aspx");
      config.Scripts = false;
      this.Window1.Load(config);
}



Hope this helps.

--
Agha
Last Login: 8/1/2008 10:10:56 AM
Posts: 2,
Posted 7/28/2008 7:40:58 AM

Group: Coolite Early Adopter
 Hi guys,

I'm trying to use the code, everything seems to work ok, but I'm getting an extjs error parsing the window webpage html. I'm using the property Frame=true.

Error: unknown runtmie error


update : function(html, loadScripts, callback){


...


this.dom.innerHTML = html;

the html variable have the loaded webpage html.

any clues?

thanks,

pstorch

Last Login: Today @ 2:56:18 PM
Posts: 234,
Posted 8/1/2008 7:32:03 AM

Group: Coolite Premium Member & Early Adopter
 Has anyone been able to resolve this?  This same error occurs with using the ExtJS framework directly (not Coolite controls). 

I looked through all the samples of using AutoLoad in Ext:window and Ext:tabpanel.  It seems they all point to a page that returns simple html without all the other crap that an aspx page throws in.  That seems a little misleading that the samples claim you can use AutoLoad to load any page.
« Prev Topic | Next Topic »
Reading This Topic
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.
All times are GMT -8:00, Time now is 7:09pm