captainsina
24 Apr 2008, 5:30 AM
Hi all,
I am using the load method to load a button tag into a panel. It shows everything properly. But I cannot get a reference to the element. Here is the code of the html page called Hello.html:
<inputtype="button"id="btn"name="btnName"value="Hello Worldddd"/>
Then in my js file i try to get this button:
Ext.onReady(function(){
var p = new Ext.Panel({
title: 'My Panel',
collapsible:true,
renderTo: 'script',
width:400
});
p.load('hello.html');
var myButton= Ext.get('btn');
});
myButton is always null!
Is there anyway to do this?
Thanks
I am using the load method to load a button tag into a panel. It shows everything properly. But I cannot get a reference to the element. Here is the code of the html page called Hello.html:
<inputtype="button"id="btn"name="btnName"value="Hello Worldddd"/>
Then in my js file i try to get this button:
Ext.onReady(function(){
var p = new Ext.Panel({
title: 'My Panel',
collapsible:true,
renderTo: 'script',
width:400
});
p.load('hello.html');
var myButton= Ext.get('btn');
});
myButton is always null!
Is there anyway to do this?
Thanks