Results 1 to 2 of 2
Thread: Event.observe problem
- 09-07-2011, 09:04 PM #1
Member
- Join Date
- Sep 2011
- Posts
- 1
- Rep Power
- 0
Event.observe problem
hello, im trying to change 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!!Last edited by yoni101kessler@; 09-07-2011 at 09:07 PM.
- 09-07-2011, 09:26 PM #2
Similar Threads
-
Event Collision (What I call it) Problem.
By Alerhau in forum New To JavaReplies: 4Last Post: 08-06-2011, 09:10 PM -
Layout and button event problem! please help
By counterfox in forum AWT / SwingReplies: 0Last Post: 01-28-2011, 12:48 AM -
JColorChooser modeless - Event Listener problem
By siamino in forum New To JavaReplies: 1Last Post: 04-14-2009, 12:39 AM -
checking for an event during an event
By infinity in forum AWT / SwingReplies: 22Last Post: 04-09-2009, 01:08 AM -
problem with event handling!!!
By ahdus in forum Java AppletsReplies: 1Last Post: 11-17-2007, 06:24 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks