1. #21
    Ext JS Premium Member
    Join Date
    Dec 2007
    Posts
    213
    Vote Rating
    0
    sanjshah is on a distinguished road

      0  

    Default


    Aplogies, but I'm not sure what I'm doing wrong, here is my main page:

    PHP Code:
        Ext.BLANK_IMAGE_URL '../ext-2.0/resources/images/default/s.gif';

        
    Ext.onReady(function(){
            
    Ext.QuickTips.init();
            
    Ext.QuickTips.getQuickTip().interceptTitles true;
            
    Ext.QuickTips.enable();

            
    // create some portlet tools using built in Ext tool ids
           
    var tools = [{
                       
    qtip:'Reset',
                   
    id:'gear',
                   
    handler: function(etargetpanel){
                       
    panel.setSrc();
                   }
               },{
                   
    id:'close',
                   
    qtip:'Close',
                   
    handler: function(etargetpanel){
                       
    panel.ownerCt.remove(paneltrue);
                   }
            }];


           var 
    viewport = new Ext.Viewport({
                  
    layout:'border',
                  
    items:[{
                      
    region:'west',
                      
    id:'west-panel',
                      
    title:'O&M Sites',
                      
    split:true,
                      
    width200,
                      
    minSize175,
                      
    maxSize400,
                      
    collapsiblefalse,
                      
    animCollapse  :Ext.isIE,
                      
    //margins       :'35 0 5 5',
                      //cmargins      :'35 5 5 5',
                      
    margins       :'5 5 5 5',
                      
    cmargins      :'5 5 5 5',
                      
    layout        :'accordion',
                      
    defaultType   :'iframepanel',
                      
    layoutConfig  :{
                      
    animate:  Ext.isIE
                      
    },
                      
    defaults      :{
                            
    loadMask:false,
                            
    border:false
                       
    },
                      
    items : [{
                          
    htmlExt.example.shortBogusMarkup,
                          
    title:'Navigation'
                         
    },{
                          
    title:'Settings',
                          
    //html: Ext.example.shortBogusMarkup
                          
    defaultSrc :  'links.html'                  
                          
    }]
                  },
                  {
                      
    xtype     :'portal',
                      
    hideMode  :!Ext.isIE?'nosize':'display',
                      
    region    :'center',
                      
    id:'centerFrame',
                      
    frameConfig: { name 'mycenterFrame' },
                      
    margins   :'5 5 5 5',
                      
    defaults:{
                            
    hideMode:!Ext.isIE?'nosize':'display'
                      
    },
                      
    title:'Manuals Portal',
                      
    items:[{
                          
    columnWidth:1,
                          
    style:{padding:'10px 10px 10px 10px'},
                          
    defaultType:'iframeportlet',
                          
    defaults:{
                              
    height:800
                             
    ,loadMask:false
                             
    ,toolstools
                            
    },
                          
    items:[{
                               
    title:'Default Site'
                              
    ,defaultSrc :  'login.asp'
                          
    }]
                      }]
                  }]
            });
           var 
    toggle false;
           var 
    comeHome = function(){ Ext.getCmp('sites').activeTab.setSrc();},
               
    printPanel = function(){
                   try{
                      
    Ext.getCmp('sites').activeTab.iframe.print();
                  }catch(
    ex){Ext.Msg.alert('Sorry','Print Failure!<br />'+ex);}
               },
               
    _urlDelim '\/',
               
    getLocationAbsolute = function(){
                   var 
    d_urlDelim location.href.indexOf('\/') != -'\/':'\\';
                   var 
    u=location.href.split(d);
                   
    u.pop(); //this page
                   
    return u.join(d);
               },
               
    getSiteRoot = function(){
                var 
    url getLocationAbsolute().split(_urlDelim );
                
    url.pop();
                        return 
    url.join(_urlDelim);
               };


           
    win = new Ext.Window({
                
    title'WebBrowser Fun',
                
    id:'browserfun',
                
    layout:'fit',
                
    minimizablefalse,
                
    maximizabletrue,
                
    width:600,
                
    height500,
                
    plainfalse,
                
    items:{
                  
    xtype:'tabpanel',
                  
    id:'sites',
                  
    defaultType'iframepanel',
                  
    defaults:{
                    
    closable:true,
                    
    loadMask:{msg:'Loading Site...'},
                    
    autoShow:true,

                    
    tbar : [{ text:'Return',handlercomeHome},
                            
    '-',
                            {
    text'Print',handlerprintPanel},
                            
    '-',
                            {
                            
    split:true,
                            
    text:'Drop Down Menu',
                            
    iconCls'preview-bottom',
                            
    handlernull,
                            
    menu:{
                                
    id:'reading-menu',
                                
    cls:'reading-menu',
                                
    width:200,
                                
    listeners:{        //mask all frames while menu is visible.
                                    
    beforeshow Ext.ux.ManagedIFrame.Manager.showDragMask,
                                    
    hide       Ext.ux.ManagedIFrame.Manager.hideDragMask,
                                    
    scope      Ext.ux.ManagedIFrame.Manager

                                
    },
                                
    items: [{
                                    
    text:'Bottom',
                                    
    checked:true,
                                    
    group:'rpgroup',
                                    
    scope:this,
                                    
    iconCls:'preview-bottom'
                                
    },{
                                    
    text:'Right',
                                    
    checked:false,
                                    
    group:'rpgroup',
                                    
    scope:this,
                                    
    iconCls:'preview-right'
                                
    },{
                                    
    text:'Hidden',
                                    
    checked:false,
                                    
    group:'rpgroup',
                                    
    scope:this,
                                    
    iconCls:'preview-hide'
                                
    }]
                            }
                        }
                      ],
                    
    listeners:{
                           
    activate:function(panel){
                               
    ///panel.getFrame().removeShim();
                            
    }
                    }
                  },      
    //   prevent frames from bleeding thru overLayed tabs
                  
    listeners:{
                          
    beforetabchange:function(tabPanel,newTab,prevTab){
                              
    //if(prevTab)prevTab.getFrame().applyShim();
                            
    }
                         },
                  
    items: [{
                         
    id'google'
                        
    ,title:'Google'
                        
    ,defaultSrc : function(){return 'http://www.google.com';}
                           }, {
                         
    id'ajaxian'
                        
    ,title:'Ajaxian'
                        
    ,defaultSrc :  'http://www.ajaxian.com'

                           
    }, {
                         
    id'extjs'
                        
    ,title:'Ext Forums'
                        
    ,defaultSrc :  'http://extjs.com/forum/showthread.php?t=16590'
                           
    },{
                         
    id'bogus'
                        
    ,title:'Bogus Markup'
                        
    ,loadMask:{msg:'Loading Printable Bogus Markup...'}
                        
    //,frameStyle : {overflow:'scroll'}
                        //,frameConfig:{scrolling: 'yes', style:{overflow:'scroll'}}
                        
    ,html'<h1>This Iframe should be printable.</h1>'+Ext.example.bogusMarkup

                         
    ,tbar:[{
                            
    text'Print',
                            
    handlerprintPanel
                         
    },'-',{
                            
    text'Switch'//<-- Added this .reset sample
                            
    handler: function(){
                              var 
    i;
                              if(
    i=Ext.getCmp('sites').activeTab){
                                  
    toggle = !toggle;
                                  if (
    toggle){
                                    
    i.setSrc('http://www.google.com'true);
                                  }else{
                                    
    i.getFrame().reset(null, function(){
                                        
    i.getFrame().update('<h1>This Iframe should be printable.</h1>'+Ext.example.bogusMarkup);

                                    });

                                  }
                                }
                             }
                          }]
                     }
                  ]
                }
             });
             
    win.show(Ext.getBody());

             
    Ext.EventManager.on(window"beforeunload", function(){

               
    Ext.destroy(viewportwin);

             },
    window,{single:true});


    }); 
    here is the links page which is loaded in the west region:

    PHP Code:
    <html xmlns="http://www.w3.org/1999/xhtml">
    <
    head>
    <
    meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <
    title>Untitled Document</title>
        <
    script type="text/javascript" src="exttools/ext-2.0/adapter/ext/ext-base.js"></script>
        <script type="text/javascript" src="exttools/ext-2.0/ext-all-debug.js"></script>
         <script type="text/javascript" src="exttools/iframe/Portal.js"></script>
         <script type="text/javascript" src="exttools/iframe/PortalColumn.js"></script>
         <script type="text/javascript" src="exttools/iframe/Portlet.js"></script>
        <script type="text/javascript" src="exttools/iframe/miframe.js"></script>
    <script type="text/javascript">
    <!--
    function MM_callJS(jsStr) { //v2.0
      return eval(jsStr)
    }
    //-->
    </script>
    </head>
    <script type="text/javascript">
    function changepage()
    {
    Ext.getCmp('mycenterFrame').setSrc('http://www.google.com');
    }
    </script> 

    <body>
    <a href="#" onclick="MM_callJS('changepage()')">Change mycenterframe</a><br />
    </body>
    </html> 
    Not sure whats wrong here?

  2. #22
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    @sanjshah -- Any particular reason why your loading an iframe into the west regions (with All of Ext in it) just to render a menu?

    By doing that, your onclick handlers are out of scope with the main page. It'll never find the center-region frame running in its own frame.
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  3. #23
    Ext JS Premium Member
    Join Date
    Dec 2007
    Posts
    213
    Vote Rating
    0
    sanjshah is on a distinguished road

      0  

    Default


    No reason other than I would like to show a different menu in that region depending on page is loaded in the centre region, although I might be able to get around that if I a bbar to the loaded in the center page, could you please provide a very simple example a menu in the west region so that I can work on it PLEASE (I apologise but I learning as I working on a project!)

    Thanks!

    Quote Originally Posted by hendricd View Post
    @sanjshah -- Any particular reason why your loading an iframe into the west regions (with All of Ext in it) just to render a menu?

    By doing that, your onclick handlers are out of scope with the main page. It'll never find the center-region frame running in its own frame.

  4. #24
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    OK, let's keep this simple then:

    Code:
    var viewport = new Ext.Viewport({ 
                  layout:'border', 
                  items:[{ 
                      region:'west', 
                      id:'west-panel', 
                      title:'O&M Sites', 
                      split:true, 
                      width: 200, 
                      minSize: 175, 
                      maxSize: 400, 
                      collapsible: false, 
                      margins       :'5 5 5 5', 
                      cmargins      :'5 5 5 5', 
                      layout        :'accordion', 
                     defaultType   :'iframepanel', 
                      layoutConfig  :{ 
                         animate:  Ext.isIE 
                      }, 
                      defaults      :{ 
                            loadMask:false, 
                            border:false 
                       }, 
                      items : [{ 
                          html:'<a href="http://www.yahoo.com" target="mycenterFrame">Change mycenterframe</a><br />', 
                          title:'Navigation' 
                         }] 
                  },
                 { 
                      xtype     :'portal', 
                      hideMode  :!Ext.isIE?'nosize':'display', 
                      region    :'center', 
                      id:'centerFrame', 
                frameConfig: { name : 'mycenterFrame' }, margins   :'5 5 5 5', 
                      title:'Manuals Portal', 
                      items:[{ 
                          columnWidth:1, 
                          style:{padding:'10px 10px 10px 10px'}, 
                          defaultType:'iframeportlet', 
                          defaults:{ 
                              height:800 
                             ,loadMask:false 
                             ,tools: tools 
                            }, 
                          items:[{ 
                              title:'Default Site' ,
                               frameConfig: { name : 'mycenterFrame' },
                             defaultSrc :  'login.asp' 
                          }] 
                      }] 
                  }] 
            }); 
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  5. #25
    Ext JS Premium Member
    Join Date
    Dec 2007
    Posts
    213
    Vote Rating
    0
    sanjshah is on a distinguished road

      0  

    Default


    Thanks hendricd,

    That's great! I can play around with code provided.

    Regards,

    Sanj

  6. #26
    Ext User
    Join Date
    Sep 2007
    Posts
    12
    Vote Rating
    0
    cmarin is on a distinguished road

      0  

    Default Thank You

    Thank You


    Doug,
    Thank you so much, you're suggestion worked! The only issue I'm facing now is that the local page that is loaded in the iFrame is cut off at the bottom and no scroll bars are appearing. I notice that if I change the iFrame to point to Amazon's homepage though, the scroll bars appear automatically. Do you happen to have any suggestions to fix this?

    Quote Originally Posted by hendricd View Post
    The defaultSrc property is a Component config startup url, and it not considered again after the Panel is rendered.

    To change the current url, use the setSrc method after rendering, when you're ready:

    Code:
    Ext.getCmp('viz').setSrc('http://www.google.com');

  7. #27
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    @cmarin -- The default styling for the rendered frame is overflow:auto, thus scollbars will not appear unless necessary. Is your start page a "short" one?
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  8. #28
    Ext User
    Join Date
    Sep 2007
    Posts
    12
    Vote Rating
    0
    cmarin is on a distinguished road

      0  

    Default Short Page

    Short Page


    Doug, thank you again. Yes, the page that houses the iFrame takes up the height and width of the screen so in many cases it will be shorter than the one it will house in the iFrame. Is there any way around this?

    Quote Originally Posted by hendricd View Post
    @cmarin -- The default styling for the rendered frame is overflow:auto, thus scollbars will not appear unless necessary. Is your start page a "short" one?

  9. #29
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    Are you looking for scrollbars ON all the time?
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  10. #30
    Ext User
    Join Date
    Sep 2007
    Posts
    12
    Vote Rating
    0
    cmarin is on a distinguished road

      0  

    Default Scroll

    Scroll


    For the iFrame itself autoscroll would be ideal but if that is not possible scrollbars at all times would be an improvement over not being able to see the bottom of the page. Thanks again.

    Quote Originally Posted by hendricd View Post
    Are you looking for scrollbars ON all the time?

Thread Participants: 184

  1. franklt69 (7 Posts)
  2. galdaka (1 Post)
  3. jarrod (1 Post)
  4. jay@moduscreate.com (3 Posts)
  5. willgillen (1 Post)
  6. DaNCeT (1 Post)
  7. stever (1 Post)
  8. Dumbledore (1 Post)
  9. JeffBurr (1 Post)
  10. timb (2 Posts)
  11. dolittle (3 Posts)
  12. mystix (4 Posts)
  13. fangzhouxing (2 Posts)
  14. cobnet (3 Posts)
  15. mysticav (7 Posts)
  16. chiphi13 (1 Post)
  17. sdrew (2 Posts)
  18. Zakaroonikov (1 Post)
  19. DigitalSkyline (1 Post)
  20. Darklight (8 Posts)
  21. mirage (2 Posts)
  22. sj137 (2 Posts)
  23. NBRed5 (2 Posts)
  24. ethraza (1 Post)
  25. Ytorres (1 Post)
  26. javaopensource (2 Posts)
  27. naxito (7 Posts)
  28. pbaccari (2 Posts)
  29. Ronaldo (2 Posts)
  30. myrddin (2 Posts)
  31. provagino (3 Posts)
  32. mjlecomte (1 Post)
  33. ZooKeeper (7 Posts)
  34. liusyan (1 Post)
  35. border9 (1 Post)
  36. bbz (2 Posts)
  37. adkent (2 Posts)
  38. gelleneu (2 Posts)
  39. robin30 (6 Posts)
  40. ollyando (4 Posts)
  41. evilized (2 Posts)
  42. nkohari (1 Post)
  43. rballman (2 Posts)
  44. cmarin (5 Posts)
  45. mykes (2 Posts)
  46. bhomass (13 Posts)
  47. robiechahine (1 Post)
  48. wm003 (1 Post)
  49. egs (3 Posts)
  50. simonbun (1 Post)
  51. stumpy_uk (12 Posts)
  52. linker_lin (9 Posts)
  53. tpinne (3 Posts)
  54. Mthor (5 Posts)
  55. bkraut (2 Posts)
  56. disizben (2 Posts)
  57. GreigM (4 Posts)
  58. thoreking (1 Post)
  59. mikester (2 Posts)
  60. markpele (1 Post)
  61. donssmith (6 Posts)
  62. mankz (6 Posts)
  63. sjerry (1 Post)
  64. sanjshah (20 Posts)
  65. pigopl (2 Posts)
  66. nanich (2 Posts)
  67. marco76 (17 Posts)
  68. armit (2 Posts)
  69. colinexl (6 Posts)
  70. Romantik (6 Posts)
  71. wekkaw (2 Posts)
  72. paubach (11 Posts)
  73. zumpi (2 Posts)
  74. jbird526 (7 Posts)
  75. elishnevsky (2 Posts)
  76. markkl (2 Posts)
  77. svdb (8 Posts)
  78. basshcm (2 Posts)
  79. Boon (1 Post)
  80. csextjs (2 Posts)
  81. Richie1985 (5 Posts)
  82. iulian (1 Post)
  83. varsos (9 Posts)
  84. WixSL (7 Posts)
  85. Rafael (6 Posts)
  86. mbogdanovich (4 Posts)
  87. JErickson (3 Posts)
  88. cirvine (2 Posts)
  89. damian79 (1 Post)
  90. jimkan (4 Posts)
  91. specialagent24 (5 Posts)
  92. smartesttom (3 Posts)
  93. dias (2 Posts)
  94. zombeerose (4 Posts)
  95. eway (3 Posts)
  96. GOTTMODUS (1 Post)
  97. alexpgh (1 Post)
  98. keckeroo (1 Post)
  99. hp (1 Post)
  100. gpstatnon (5 Posts)
  101. jdecarvalho (1 Post)
  102. calverte (1 Post)
  103. SyRenity (3 Posts)
  104. zerba78 (14 Posts)
  105. vvietsch (1 Post)
  106. shuang (1 Post)
  107. Michou (2 Posts)
  108. shay2501 (4 Posts)
  109. pokerking400 (2 Posts)
  110. gbradley (2 Posts)
  111. cesarwbr (6 Posts)
  112. Ronhead (3 Posts)
  113. MichaelOstrovsky (4 Posts)
  114. tfulmino (1 Post)
  115. superFly77 (9 Posts)
  116. Jinping (2 Posts)
  117. evelynloo (4 Posts)
  118. excelsis (3 Posts)
  119. shirkavand (3 Posts)
  120. LovingIt (1 Post)
  121. emredagli (3 Posts)
  122. joedimagio (3 Posts)
  123. lucky_luk3 (2 Posts)
  124. peter seliger (2 Posts)
  125. cazzadori (2 Posts)
  126. wkwathen (3 Posts)
  127. afei (5 Posts)
  128. dubrovsky (5 Posts)
  129. muratyildiz (2 Posts)
  130. service@think-1st.de (8 Posts)
  131. vayumahesh (1 Post)
  132. salilak (1 Post)
  133. v.zen (8 Posts)
  134. Stephan Schrade (8 Posts)
  135. prp (1 Post)
  136. kunduvalappil (2 Posts)
  137. Bucs (13 Posts)
  138. butters1976 (7 Posts)
  139. alexw23 (1 Post)
  140. Drayton (8 Posts)
  141. abnervv (2 Posts)
  142. Hanna Lu (1 Post)
  143. telly (1 Post)
  144. carnifun (2 Posts)
  145. icryrainix (3 Posts)
  146. mschwartz (5 Posts)
  147. ke.xu (2 Posts)
  148. extjs_new (1 Post)
  149. piroman (15 Posts)
  150. cdeguzman (1 Post)
  151. kaglim (2 Posts)
  152. Alex84 (1 Post)
  153. rakhib (1 Post)
  154. ady@daxtechnologies.com (7 Posts)
  155. Grolubao (1 Post)
  156. johnfron (1 Post)
  157. westy (1 Post)
  158. chrizmaster (1 Post)
  159. col (2 Posts)
  160. jackjia (1 Post)
  161. gamunculus (1 Post)
  162. cdeclercq (3 Posts)
  163. muxcmux (1 Post)
  164. ahisis (3 Posts)
  165. easycodes (3 Posts)
  166. kanntronics (1 Post)
  167. Maxrunner (10 Posts)
  168. stitcherooni (3 Posts)
  169. Rushleader (2 Posts)
  170. Tinki (2 Posts)
  171. gamekingx (1 Post)
  172. nandubochkar (2 Posts)
  173. Hilbert (2 Posts)
  174. pabloflores (3 Posts)
  175. ashaihullin (2 Posts)
  176. the_traveller (1 Post)
  177. jasmina (4 Posts)
  178. luisloboborobia (1 Post)
  179. Macortel (3 Posts)
  180. liuqiwuhao@163.com (1 Post)
  181. scaddenp (3 Posts)
  182. hjfiou (1 Post)
  183. tstone84 (1 Post)
  184. jbarry (1 Post)

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar