Hi!
I am also having trouble with same thing as Kevin had. So I have a screen called regScreen then I have 4 input fields namely, regEmail, regPass, regConfirmPass and regUsername. My button is called btnReg.
On the load event of the regScreen I have the following code:
var button = Tiggr('btnReg');
button.addClass('ui-disabled');
this works and disables the button on load.
Q1)
So now under the value changed event of the fields I added custom javascript I placed the following code there.
var username = Tiggr('regUsername').val();
var email = Tiggr('regEmail').val();
var pass = Tiggr('regPass').val();
var cpass = Tiggr('regConfirmPass').val();
var button = Tiggr('btnReg');
if (username '' email != '' || pass != '') {
button.addClass('ui-disabled');
}
else {
button.removeClass('ui-disabled');
}
But this is not working, the button just stays disabled. I feel like I am declaring the variables wrong maybe?
Q2)
Also I'd like to create this as a function to globally be accessible by this page. Where would I insert the javascript to do this?