hello, im trying to chane a label(id="label") css, by chaging its class, when the user starts typing in another input text box(id=textbox"),
the script i wrote is this:
<script>
Event.observe( window, 'load', function() {
var input = document.getElementByid( 'textbox' );
var label=document.getelementbyid('subtext');
if (input.value!='')
label.classname='has-text';
if (input.value=='')
label.classname='inline';
});
</script>
what is wrong with it? why its not working?
in the chrom browser i got the following notice:
object function event(){[native code]} has no method 'observe'
Bookmarks