www.webdeveloper.com
Results 1 to 2 of 2

Thread: Event.observe problem

  1. #1
    Join Date
    Sep 2011
    Posts
    2

    Event.observe problem

    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'

    thank u for helping!!

  2. #2
    Join Date
    Sep 2011
    Posts
    2

    re

    somebody??...

    maybe some other idea for this task to work??...

    thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles