If I want to evaluate a JSF bean property from within JavaScript, I see that it works if the JavaScript snippet is inside the xhtml file, but doesn\'t work when the JavaScri
I personally prefer the following approach
$(document).ready(function() { alert($("#myHiddenData").val()); // or alert($("#myFormID\\:myHiddenData").val()); });
I just don't like mixing js code with JSF...