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

return statement is not working -- may be one bug in YUI

Expand Messages
  • SHIVA KUMAR
    Hi, I have noticed that the return statement is not working in drag and drop methods without alert statement.I think it may be one of the bugs .I have special
    Message 1 of 1 , Jun 1, 2007
    View Source
    • 0 Attachment
      Hi,
         I have noticed that the return statement is not working in drag and drop methods without alert statement.I think it may be one of the bugs .I have special requirement. In that suppose if user clicks on one radio button I have to disable the drag and drop functionality.To acheive this what I have done is
      I created one global variable(ddFlag) and onclick of radio button I make that global variable as true.In onMouseDown I did the following thing.

      onMouseDown:function(e){
       ya = Event.getPageY(e);
       xa = Event.getPageX(e);
       if(ddFlag==true){
                  //alert("hai");
           return;
                  }
       }
       
         Suppose if I put alert statement before return statement it's working fine ie it's disabling the drag and drop functionality. If I delete the alert() statement it's not disabling the drag and drop functionality.

           I tried to put same condition in onDrag, endDrag, onDragOver and onDragDrop methods but it's not working properly. If I put alert statement in any one of method it's working nicely.
       
         To solve this problem what I have to do. So please assist me in this issue.
       
      Thanks & Regards,
      Siva Kumar.


      Download prohibited? No problem! CHAT from any browser, without download.
    Your message has been successfully submitted and would be delivered to recipients shortly.