
September 27th, 2012, 03:12 PM
|
|
Registered User
|
|
Join Date: Sep 2012
Posts: 1
Time spent in forums: 15 m 42 sec
Reputation Power: 0
|
|
Fetch value from another javascript
Parent XUL triggers script2.js, after modal-xul(used for authentication and capturing username) is done with script1.js. So issue is when script2.js triggers, how does it get the value set in app. the alert in script2.js goes into error
script1.js
Code:
var app;
function method1() {
var username = document.getElementById('username').value;
app = new UserText();
app.setValue(username);
// more logic
}
script2.js
Code:
alert(app.getValue());
|