PDA

View Full Version : Managed iframe url problem



metoome
18 Mar 2010, 10:26 PM
Hi friends
i am a newbie to Ext Js , and have been using it for past 2 weeks, we have a project to be reviewed which has been done using extjs and cakephp, i am struck at a point where a url is passed to a another window which loads a iframe within an iframe

here is code for the js file which on click should load a file



/*
* Layout Window GUI
* under the Plugin namespace
*/
Plugin.CMS = Ext.extend(Ext.app.Module, {
id : 'cms-win',

init : function(){
this.launcher = {
text: 'Content Management',
tooltip: 'Wonderzone Content Management',
iconCls:'orgchart',
handler : this.createWindow,
scope: this
}
},

createWindow : function(){
var desktop = this.app.getDesktop();
var win = desktop.getWindow('cms-win');

if(!win){
win = desktop.createWindow({
id: 'cms-win',
title:'Content Management',
width:740,
height:480,
iconCls: 'orgchart',
shim:false,
animCollapse:false,
border:false,
constrainHeader:true,
frame:true,
autoScroll:true,
body: new Ext.ux.ManagedIFrame({autoCreate:{id:'dynamicIframe9',cls:'x-window-body',width:'100%',height:'100%',src:'admin/cms'}}),
layout: 'fit'
});
win.maximize();
}
win.show();
}
});
actually i am using the cakephp frame work
so my default url will be

http://localhost/test/wz/pages
where pages is my default controller

when i run the code along with other files..

actually when i try to call a function named cms () from the pages_contorller.php (pages controller )

i get " /admin/cms page not found error "

but instead of src:admin/cms if i specify src:http://www.google.com or some other url with "http:// " i am able load the pages.

i am not sure where i am doing wrong..
please help me

thanks in advance