Create client-side window with auto loader

  1. #1

    Create client-side window with auto loader

    Hi,

    I'm trying to create a window on client-side, that loads a html page as soon as it is shown (by pressing a button). The problem is i can't see the html page inside the window although it seems to be loaded.

    The aspx code is as follows:
    ...
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:Button runat="server" Text="Open" Icon="Application">
            <Listeners>
                <Click Handler="showWindow();" />
            </Listeners>
        </ext:Button>
        </form>
    </body>
    ....
    The javascript function is described next:
    function showWindow() {
    
        var win1 = new Ext.Window({
            id: 'test1',
            title: 'Test Window',
            closeAction: 'destroy',
            width: 500,
            draggable: true,
            height: 530,
            closable: true,
            modal: true,
            plain: true,
            loader: {
                url: 'Developing.htm',
                loadMask: false,
                autoLoad: true,
                renderer: 'html',
                success: function (el, response, opts) {
                    alert('OK');
                },
                failure: function (el, response, opts) {
                    alert('error');
                }
            },
            buttons: [
    		{
    		    text: 'Close',
    		    handler: function () {
    		        win1.close();
    		    }
    		}]
    
        });
        win1.show();
    }
    The 'Developing.htm' page just has one big image.

    Can you please help?

    Thanks.
  2. #2
    Can you post 'Developing.htm'?
    Also try to use iframe 'renderer: 'frame''
  3. #3
    Quote Originally Posted by Vladimir View Post
    Can you post 'Developing.htm'?
    Also try to use iframe 'renderer: 'frame''
    Sure, here it is:
    <!DOCTYPE html>
    <html lang="pt-pt">
    <head>
        <title>Em Desenvolvimento</title>
    <style type="text/css">
    .image {
    	border: 1px solid #000;
    }
    </style>
    </head>
    <body>
        <table width="100%" height="100%">
            <tr align="center">
                <td style="text-align: center; vertical-align: middle;">
                    <img src="images/em_construcao.jpg" class="image" />
                </td>
            </tr>
        </table>
    </body>
    </html>
    I've changed renderer mode to iframe, but no best results :(
  4. #4
    Ups, sorry... i was using iframe instead of frame. It works with renderer: 'frame'. I didn't find this option in sencha docs: only html, data or content available.

    many thanks!

Similar Threads

  1. [CLOSED] how to create multi select combobox on client side
    By mirwais in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Aug 30, 2012, 2:51 PM
  2. [CLOSED] How I can create a CalendarPanel in client side?
    By supera in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: May 18, 2012, 4:51 PM
  3. How to Create MultiCombo at client side?
    By zhangsir199 in forum 1.x Help
    Replies: 4
    Last Post: Aug 20, 2010, 5:53 AM
  4. Replies: 4
    Last Post: Mar 19, 2010, 11:35 AM
  5. Create Simple Store and Bind to Grid Client-Side?
    By Tbaseflug in forum 1.x Help
    Replies: 4
    Last Post: Oct 30, 2009, 5:27 PM

Posting Permissions