I’m a bit confused it seems here. What I’m trying to do is create a Javascript function that disables all inputs on a page, and then a function that enables all the inputs on a page.
This was pretty easy with jQuery. My question is, how can I wrap these jQuery functions in a traditional JS function? The reason I need to do this is because I’m calling these functions using ActionScript. Put another way, I don’t understand how I can write jQuery code and then call it in a tradition Javascript function call manner.
Works great, but isn’t wrapped in a function…
$(document).ready(function() {
$(':input').attr('disabled', "disabled");
});
Wrapped in a function and doesn’t work at all, what am I doing wrong here??
function init_lock_test(){
$(':input').attr('disabled', "disabled");
}
You can’t directly call JavaScript functions in a web page from ActionScript, and there’s no special thing as a “jQuery function.” You should be using ActionScript’s ExternalInterface to call the JavaScript function indirectly: