I have the following function setup:
function disableButtons(){
$('div.test').block({
message: '<h1>Processing</h1>',
css: { border: '3px solid #a00' }
});
}
Now I have another function I would like to call that from:
function test(){
//call function here
disableButtons();
}
If I put the exact information of function 1 into function 2, it works, but not if I call function 1 directly from function 2. Here is how I would like it to work:
function1 () {
//function statements
}
function2 () {
function1();
}
It seems to me this should just "work" but I'm thinking something is wrong with my syntax, perhaps, because it is not working.
EDIT: Here is my actual code...
function disableButtons(){
$('div.test').block({
message: '<h1>Processing</h1>',
css: { border: '3px solid #a00' }
});
function selectEmployeeInfo(){
disableButtons();
document.forms[0].action="userGet.do";
document.forms[0].submit();
}
test()?disableButtonsis defined inside another function block? If so, you cannot call it directly (javascript functions are first-class functions).