SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Threaded View

  1. #1
    SitePoint Member Toxical's Avatar
    Join Date
    Apr 2002
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    attach/detach problem.

    Alright, I've got a problem.
    I'm attaching the function hover() to the whole document, which should fire onpropertychange.
    Well, but the <option> tag should not be affected by this eventhandler.
    Code:
    PHP Code:
    window.onload=Init;

    function 
    Init(){
        if(
    document.activeElement){
            
    document.attachEvent("onpropertychange",hover);
            
    option document.getElementsByTagName("option");
            for(
    0option.lengthj++){
              
    document.getElementsByTagName("option")[j].detachEvent("onpropertychange",hover);
            }
        }

    doesn't work unfortunately...

    May there exist an other possibility to reach the result I'm aiming for?

    Thx a lot, and sorry for my bad English
    Last edited by Toxical; Aug 19, 2002 at 05:57.
    I beg your pardon for my bad English


Bookmarks

Posting Permissions

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