[CLOSED] Reload an iframe within a panel

  1. #1

    [CLOSED] Reload an iframe within a panel


    Hi

    I am having a problem, i have a tab panel within a window. To open the window users select an option from a gridpanel, the id of the selected item is then added to the autoload parameters.

    The problem that i am having is that i want to set the tab to reload if it has already rendered. I don't want to set ReloadOnEvent="true" as this reloads the tab every time it is selected.

    Could you please let me know if there is any way that i can set the tab to reload next time it is selected.

    This code is shown below.

    thanks

    
    
    [.aspx]
    <ext:Panel runat="server" ID="tabProjectsGrid" Icon="Calendar" Title="Projects" StyleSpec="padding: 6px;">
    
        <AutoLoad Url="ProjectsGrid.aspx" Mode="IFrame" TriggerEvent="show" ShowMask="true" >
    
            <params>
    
                <ext:Parameter Name="IptID" Value="-2"></ext:Parameter>
    
            </params>
    
        </AutoLoad> 
    
    </ext:Panel>
    
    
    
    [.js]
    
    
    if (hidIptID.value != zIptID) { // if the id is different
    
        hidIptID.setValue(zIptID);
        window.tabProjectsGrid.autoLoad.params.IptID = zIptID;
    
    
        if (window.tabProjectsGrid.rendered) {
    
            // Set the tab to reload when it is selected!!!
            // *******************
        }}







    </PRE>
  2. #2

    RE: [CLOSED] Reload an iframe within a panel

    Hi,

    Hmm... What difference between "reload if it has already rendered" and "reloads the tab every time it is selected"?

    You can always reload iframe inside panel
    tabProjectsGrid.reload();
    or
    tabProjectsGrid.reload(true); // nocache
    Also you can update parameters before reloading
    tabProjectsGrid.getAutoLaod().params.IptID = newValue;
    Please see the following sample
    https://examples1.ext.net/#/Panel/Ba...erred_Loading/
  3. #3

    RE: [CLOSED] Reload an iframe within a panel



    The diference is that there is a grid, each time a diferent item is clicked a window opens.

    The tab needs to be loaded with the content for the item selected in the grid. If the user moves between the tabs several times then the tab will load several times.

    I just want the tab to be refreshed when a diferent item is selected from the grid.

    In theory i would like to set rendered to false at this point, but i cannot as this is readonly. The .reload(true); works but only partially.

    The tab contains a tablegrid I have used the "Convert an exiting HTML <table> into a gridpanel example.

    i have the following html

    <ext:TableGrid ID="tblgrdStrategicObjectives" runat="server" StripeRows="false" Border="true" frame="true" stateful="false" trackMouseOver="true" selectionMemory="Disabled" Title="Strategic Objectives" Layout="fit" AutoHeight="false" ColumnLines="true" AutoExpandColumn="0" EnableColumnMove="false" EnableHdMenu="false">
        <Defaults>
            <ext:Parameter Name="Sortable" Value="false" ></ext:Parameter>
        </Defaults>
        <Tools>
            <ext:Tool Type="Refresh" Handler="strategicObjectiveRefreshList();" Qtip="Refresh Strategic Objectives list" >
            </ext:Tool>
        </Tools>
        <listeners >
            <AfterRender Fn="tblgrdStrategicObjectivesAfterRender" />
        </listeners>
    </ext:TableGrid>
    When the page loads i create a string containing the HTML of a table and then output this to a div. I then set the Table for the tablegrid and this renders as expected.

    The layout of this content does not fit the window when i reload the form. is this a bug or do i need to find another way to reload the form.

    While i am on the subject of the table grid, i would like to disable the sorting of rows on the columns. is this possible?
  4. #4

    RE: [CLOSED] Reload an iframe within a panel

    Hi,

    Please demonstrate it with simple example. The single which i can suggest: make tab as active before reload otherwise the size of the content can be unexpected before hidden area has no size

    If you post simple example which I can test then I give another recomendation

Similar Threads

  1. [CLOSED] Tab Panel reload
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 14
    Last Post: May 30, 2012, 5:55 PM
  2. [CLOSED] Reload Clild Iframe after delete item.
    By stoque in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Oct 23, 2011, 5:19 PM
  3. Force reload on IFrame
    By Born2Code in forum 1.x Help
    Replies: 2
    Last Post: Mar 22, 2010, 5:25 AM
  4. [CLOSED] Reload a tab content in a center region IFrame
    By ljcorreia in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Jan 22, 2010, 11:45 AM
  5. [CLOSED] Trying to refresh/reload iFrame in tabs...
    By iansriley in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Apr 19, 2009, 2:40 AM

Posting Permissions