I’m working with Composite Components in JSF and ran into troubles regarding JavaScript that I need to use. I have the following script:
$(document).ready(function() {
$("#form_test\\:text_auto").bind("keyup",function() {
setTimeout(function() {
send_ajax();
}, 500);
});
});
In order to be able to use this in different places, with different form ids and not prependId=false; I need to somehow initialize the script with the form id (in this example “form_test”).
Binding the events like “keyup” using jQuery works well, so if possible I’d like to continue using that mechanism. Is it possible to somehow set the form id dynamically?
What about something like this: