Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Loading iframe into Panel's body

  1. #1

    Default Loading iframe into Panel's body

    Hello,

    Has anyone experienced loading iframe into the panel's body calls the server twice? for instance...
    Code:
    myPanel.update("<iFrame  src=\"" + url + "\" height='100%'  width='100%' onload='$rend.resizeFrame(this)' scrolling='no' />");
    I found that it calls the server twice. Any there any way to get around? using load method calls the server once but as yo know I have to load inside iframe.


    thanks in advance.
    Bhochhi

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    Use an iframe AS the panel's body.

    This keeps being illustrated here. Condor posted an example just last week.

  3. #3

    Default

    Thank you for the response. My problem is I have an array of panels and "src" of iframe is not available when panels are first loaded. Later, when clicked on header, the panel is expanded with body containing iframe. After checking the posts you have referred and tried to use bodyCfg config on panel but since I don't have src while creating panel, I am wondering how I can feed the src later....

  4. #4
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    Set the src attribute!

  5. #5

    Default

    Thank you again for quick but short response. I discovered that its not because of update method, but iframe gets loaded again when I expand the panel. Initially all my panels are collapsed. when clicked on panel's header, it expands to show previously loaded iframe. problem is it reloads the iframe again. Also, would tell me how to set the src attribute when I use the iframe as panel's body? I tried with sPanel.body.query('iframe')[0].src, but doesn't seems like this is the way.

  6. #6

    Default

    Quote Originally Posted by Animal View Post
    Use an iframe AS the panel's body.

    This keeps being illustrated here. Condor posted an example just last week.
    I've been scouring the forums but I can't find a working example. Can you provide a link to Condor's example? Thanks.

  7. #7

  8. #8

    Default

    This is the one Animal referring to. I checked both of them but couldn't resolved the issue yet. All I found was, when we collapse or expand the panel containing the iframe, The iframe is reloaded accessing the server referred by src attribute.

  9. #9
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    That has to be a browser bug. collapsing just changes the body element's visibility. I can't see why it would need to reload the document.

  10. #10

    Default

    Yes you are right, collapsing/expanding just changes the body element's visibility. But if you collapse/expand the panel by clicking the panel's header( titleCollapse = true ), I discovered that if body contains the iframe, it reloads the iframe contains by calling the src link.

Page 1 of 2 12 LastLast

Similar Threads

  1. Loading a GridPanel within a Rowexpander body with ajax
    By bramvano in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 15 Jul 2009, 11:12 PM
  2. Click dialog body (iframe) to bring to front
    By Nullity in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 28 Jun 2007, 10:46 AM
  3. Loading Indicator when loading IFrame
    By ablu in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 1 May 2007, 10:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •