document.ready() in jQuery
894552Mar 2 2012 — edited Mar 5 2012Hi,
On jsf fragement page, I want to do something when the is loaded. So, in jQuery, I do this.
<af:resource xmlns:af="http://xmlns.oracle.com/adf/faces/rich type="javascript">
$(document).ready(function() {
// Handler for .ready() called.
alert('load');
$("input[name='" + "T:prof:businessS:viewbusiness:oliit4" + "']").attr("readonly", true);
});
….
</af:resource>
The ready() is called only when the page is just loaded. If I go to another page, and come back to the page, ready() is not invoked. If I hit “F5” to refresh the page, I got the alert. Is it supposed to fire the alert every time a page is loaded or “clicked”?
Thank you.