Re: Find Selected DOM Element

  •  05-05-2011, 3:27 PM

    Re: Find Selected DOM Element

    Eric, thank you for responding...
     
    Forgive me for being a little dense, but I'm just following up for clarity's sake.
     
    Im guessing your post is a response to my //comments in the code thus(this seems to make sense in context):
    else if(rng.length >= 1)//not sure about this code dday
     
    Or maybe you were just trying to help my obvious confusion. I hadn't really played with these methods before and so have no idea how many goofy things may be in there. All I know is it works like a charm. Either way thanks again.
     
    Worth noting that this method allows me to combat something I've seen a few others post about which is the "CssClass" toolkit control. In the current version this puts a span with the class inside whatever element is selected. This is completely undesirable on so many levels I think. So with a little extra effort I attach this code(plus a little extra) to the CssClass toolkit control and I get an actual class put on the element that is actually selected instead of a span inside. As a bonus I still retain all the other subtle functions of the CssClass control's behaviors.
     
    BTW...its ironic that the page you gave me for JavaScript advice is filled with JavaScript errors when you try to do anything with it in IE8 (thats no reflection on you...just ironic).
     
    Thx,
     
    dday
View Complete Thread