May 25, 2010, 5:47 AM
[CLOSED] [1.0] Window show / hide from JS
CLOSED - I have just updated to the latest version from the SVN and now it works
------------------------------------
I have a javascript button which should show/hide a window.
The window is created from code-behind:
Window templateWindow = new Window();
templatewindow.Width = 300;
templatewindow.Height = 160;
templatewindow.Icon = Icon.HtmlAdd;
templatewindow.Padding = 5;
templatewindow.Title = "Select template";
templatewindow.ID = "AdoreTemplateWindow";
templatewindow.IDMode = IDMode.Static;
templatewindow.CloseAction = CloseAction.Hide;
//templatewindow.Modal = true;
//templatewindow.Visible = true;
templatewindow.Hidden = true;
templatewindow.Html = "TEST";
This is the function to show the window:function insertTemplate() {
var win = Ext.get('AdoreTemplateWindow');
win.show(this);
alert(win.id);
}
From the alert I get its ID, but it won't show me the Window when Clicking the button.The button is placed in the HtmlEditor:
HtmlEditor.tb.addButton({ handler: insertTemplate, iconCls: 'icon-htmladd', tooltip: 'Insert Template<br>Adds a template to your document' });
Any suggestions?