Re: How to get html DOM of IMG element of selected image in Firefox

  •  11-16-2009, 9:15 AM

    Re: How to get html DOM of IMG element of selected image in Firefox

    Hi maulikce,
     
     else if (window.getSelection){
            rng=editwin.getSelection();
            if (rng.rangeCount > 0 && window.XMLSerializer)
            {
              rng=rng.getRangeAt(0);
              for(var i=0;i<rng.startContainer.childNodes.length;i++)
              {
              if(rng.startContainer.childNodes[i].tagName=="IMG")
              {
            
                html=rng.startContainer.childNodes[i].src;
              }
         
              }
           
            }
          }
     
    Regards,
     
    Ken
View Complete Thread