Re: How do I access textField component using javascript in netbeans6.5
I got this simple page:
<webuijsf:page id="page1">
<webuijsf:html id="html1">
<webuijsf:head id="head1">
<webuijsf:script>
function timeIt() {
var x = "60:00";
document.getElementById('form1:clock').setProps({value:x});
}
</webuijsf:script>
</webuijsf:head>
<webuijsf:body id="body1" onLoad="timeIt()" style="-rave-layout: grid">
<webuijsf:form id="form1">
<webuijsf:textField columns="5" id="clock"/>
</webuijsf:form>
</webuijsf:body>
</webuijsf:html>
</webuijsf:page>
But javascript never works!
Message: 'document.getElementById(...)' is null or not an object
Any help?