PDA

View Full Version : How to access from one js file to another?



Riaz
26 Oct 2010, 3:28 PM
I have two Ext.Setup files(jsLogin.js, jsMainFrame.js). When I click login button, it should be go jsMainFrame.js. How do I do that?

Need help.




var MyLogin = new Ext.form.FormPanel({
:
:
xtype: 'button',
text: "Log On",
handler: function () {

MyLogin.submit({
waitMsg: 'Login...',
url:'MainFrame.aspx'
});
}



Is there any alternative way to do that?

evant
26 Oct 2010, 3:40 PM
What are you actually trying to do? You can't just navigate between js files. You include JS files on the page so that you can call code from them.

Riaz
26 Oct 2010, 3:47 PM
How do I call a page from the login page using js?

evant
26 Oct 2010, 3:56 PM
window.location.href = 'foo';

Riaz
26 Oct 2010, 4:00 PM
Thanks evant.
Now my code is working.