Loading ...
Sorry, an error occurred while loading the content.
 

Re: addEventListener Not working in mozilla

Expand Messages
  • Frank Bruder
    The question is, what is del? What does it do? Since you set the event listener at a use element I think it is probably a problem with event.target vs.
    Message 1 of 4 , Jan 2, 2009
      The question is, what is del? What does it do?
      Since you set the event listener at a use element I think it is
      probably a problem with event.target vs. event.currentTarget. Is
      anything reported on the error console when you click at the element?
      You can try putting an alert right as the first command in the event
      handler. If the alert window appears then you know that the event
      listener registration was successful, and the problem is in your event
      handler.

      --- In svg-developers@yahoogroups.com, chandra reddy <pcr_reddy@...>
      wrote:
      >
      > Dear all
      >
      > I have used following code to add event listner, it is working in IE
      but not in Mozilla
      > if any body knows solution please let me know.
      >
      > //
      > var newUseEl = document.createElementNS(svgNS,"use");
      > newUseEl.setAttributeNS(null,"id",'refp1');
      > newUseEl.setAttributeNS(null,"x",p);
      > newUseEl.setAttributeNS(null,"y",s);
      > newUseEl.setAttributeNS(xlinkNS,"href","#s01");
      >
      newUseEl.setAttributeNS(null,"visibility",'visible');
      > newUseEl.addEventListener("click",del,true);
      >
      document.getElementById("contents").appendChild(newUseEl);
      > object.setAttribute('visibility','visible');
      >
      > thanks in advace
      > P chandra shaker reddy
      >
      >
      >
      >
      > [Non-text portions of this message have been removed]
      >
    • chandra reddy
      Thanks for your reply. the same code is working fine in IE, so there is no problem with code. when i use this code to mozilla the event listner del is not at
      Message 2 of 4 , Jan 4, 2009
        Thanks for your reply.

        the same code is working fine in IE, so there is no problem with code. when i use this code to mozilla
        the event listner "del" is not at all invoking.can you  help me out please.

        thanks in advance
        P.Chandra Shaker Reddy




        ________________________________
        From: Frank Bruder <redurbf@...>
        To: svg-developers@yahoogroups.com
        Sent: Saturday, January 3, 2009 6:46:45 AM
        Subject: [svg-developers] Re: addEventListener Not working in mozilla


        The question is, what is del? What does it do?
        Since you set the event listener at a use element I think it is
        probably a problem with event.target vs. event.currentTarget . Is
        anything reported on the error console when you click at the element?
        You can try putting an alert right as the first command in the event
        handler. If the alert window appears then you know that the event
        listener registration was successful, and the problem is in your event
        handler.

        --- In svg-developers@ yahoogroups. com, chandra reddy <pcr_reddy@. ..>
        wrote:
        >
        > Dear all
        >
        > I have used following code to add event listner, it is working in IE
        but not in Mozilla
        > if any body knows solution please let me know.
        >
        > //
        > var newUseEl = document.createElem entNS(svgNS, "use");
        > newUseEl.setAttribu teNS(null, "id",'refp1' );
        > newUseEl.setAttribu teNS(null, "x",p);
        > newUseEl.setAttribu teNS(null, "y",s);
        > newUseEl.setAttribu teNS(xlinkNS, "href","# s01");
        >
        newUseEl.setAttribu teNS(null, "visibility" ,'visible' );
        > newUseEl.addEventLi stener("click" ,del,true) ;
        >
        document.getElement ById("contents" ).appendChild( newUseEl) ;
        > object.setAttribute ('visibility' ,'visible' );
        >
        > thanks in advace
        > P chandra shaker reddy
        >
        >
        >
        >
        > [Non-text portions of this message have been removed]
        >






        [Non-text portions of this message have been removed]
      • Frank Bruder
        I ve created a test file which uses the exact same code you posted here, and for me it worked fine in Firefox 3.0.4 for Linux. I can t send attachments over
        Message 3 of 4 , Jan 6, 2009
          I've created a test file which uses the exact same code you posted
          here, and for me it worked fine in Firefox 3.0.4 for Linux. I can't
          send attachments over the list, but I'll send the file to you directly
          in a separate mail. Tell me whether this stripped down test case works
          for you or not. If it does not then the problem must be specific to
          the Mozilla version or the operating system you use, because for me it
          works.

          Regards
          Frank
        Your message has been successfully submitted and would be delivered to recipients shortly.