I'm stating to be able to use Ext, but I want to put the code in a seperate file.
but, I don't know how to call the things I made in the external file.
I made this warning with shows up as soon as one gets on the page:
Code:
Ext.MessageBox.show({
title: 'Message from Adminestrator',
msg: 'please note this is a beta version of {site}.<br> not all features are working.<br> we are doing our best to make the site fully functional as soon as we can.',
buttons: Ext.MessageBox.OK,
animEl: 'page_body',
icon: Ext.MessageBox.WARNING
});
and this works, but only when it's indeed inline in the main file, like this.
the problem is, how do I get this in a external JS file, in such A way it works, and I can call it, I tried this:
Code:
var betaMessage = new Ext.MessageBox({
title: 'Message from Adminestrator',
msg: 'please note this is a beta version of {site}.<br> not all features are working.<br> we are doing our best to make the site fully functional as soon as we can.',
buttons: Ext.MessageBox.OK,
animEl: 'page_body',
icon: Ext.MessageBox.WARNING
});
and then tried calling it like this:
Code:
betaMessage.show();
which does nothing.
I know it's wrong (else it would have worked) but I have not the slightest idea of what it should be.
(in the code {site} is the name of the site, but it's not relevant so, not to spam the forums, I replaced it with a place holder for here)