Event (on)change issue
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Event (on)change issue

  1. #1
    Join Date
    Jan 2006
    Posts
    352

    Event (on)change issue

    I am using prototype's framework.
    I wish to fire it upon changed value in, eg: select element, if option changes.
    Code:
        Event.observe(document.body, 'change', function(event) {
        alert('I AM EVENT');
        });
    Doesn't work in IE7, but does in all other browsers.
    Why?
    Ipsens

  2. #2
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002
    Posts
    10,870

    Re: Event (on)change issue

    I'm not exactly sure as to why that won't work. I have had trouble in the past with document.body. Have you tried document.getElementsByTagName('body')[0] instead?
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Jan 2006
    Posts
    352

    Re: Event (on)change issue

    Well, that doesn't work in IE7 as well
    Ipsens

  4. #4
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002
    Posts
    10,870

    Re: Event (on)change issue

    I would suggest you contact prototype then. It could be a bug.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  5. #5
    Join Date
    Jan 2006
    Posts
    352

    Re: Event (on)change issue

    Ok, I will.
    Ipsens

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center