Viewport and IFrame

  1. #1

    Viewport and IFrame

    Guys

    Have a problem which is becoming a real pain. We create pages which work fine without a problem however as soon as we have iFrames in Sharepoint that contain those pages things stop working.

    I have only seen this when the framed page contains a Viewport. The pages largely work without a hit but certain things don't. A list of controls that fail are

    1. Date field - only when selecting a date
    2. Tree panel - when selecting a node.
    3. Paging toolbar - when clicking next page.

    As I say if I remove the viewport then no hassles.

    Any ideas?

    Thanks,
    Daniel
  2. #2

    Mmm

    Is there an alternative to viewport that has the same functionality?

    Tried several things but can't get around the fact i see the VP to resize vertically.

    Thanks in advance,
    Daniel
  3. #3

    Strange

    It is only when the iFrame exists inside a Sharepoint wss3 site that the problem comes.
    If the iFrame is on another page within the same site then no problem
  4. #4
    Ok bining the viewport and using ext:window works inside SP & achieves the same as a VP setting layout="border"
    By opening it as maximised it achieves everything the VP does except in the instance where the browser resizes although I can probably live with that.

    Be good to get the Vp working though

    Dan
  5. #5

    Updates

    Given I have recently upgraded the controls I thought I would revisit this issue as I am having to code around it continually.
    Tested the viewport inside a sharepoint and again the tree still fails to register the click events.

    Are there any clean alternatives to getting a tree panel to fill the its container without the use of the viewport?

    Ta,
    Dan
  6. #6

    Alternative

    So I thought about doing it another way by resizing the treepanel with javascript, so it looks something like this

    
            function SizeExtControl() {
                alert(getDocHeight());
                document.getElementById('ext-gen14').height = getDocHeight - 52;            
                alert('done');
            }
    The problem now is I think that the element I need to resize is not create by the time the javascipt runs so I need to either do

    1. Delay my javascript execution until ext javascript has run
    or
    2. Find some event on the tree view that can execute my script

    Neither of which I have found a solution for yet so if anyone has any ideas then please let me know.

    Ta,
    Dan
  7. #7

    Finally winner

    1. Bin the viewport
    2. Use document.getElementById('ext-gen14').style.height = "323px"; to set the height in javascript
    3. Add a listener for after render

    Seems to work ok.

    Dan

Similar Threads

  1. MVC IFrame Viewport Click Problem
    By ckarcz in forum 1.x Help
    Replies: 7
    Last Post: Mar 01, 2012, 11:30 PM
  2. viewport in iFrame or panel?
    By Tbaseflug in forum 1.x Help
    Replies: 1
    Last Post: Dec 14, 2011, 1:58 PM
  3. [CLOSED] Access component in IFrame from oter IFrame
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Feb 22, 2010, 5:58 PM
  4. ViewPort Help
    By designworxz in forum 1.x Help
    Replies: 1
    Last Post: Jan 14, 2009, 3:04 PM
  5. Help with ViewPort / Coolite Panel / IFrame
    By ljcorreia in forum 1.x Help
    Replies: 6
    Last Post: Jun 04, 2008, 3:20 PM

Posting Permissions