Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 900383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:22:43+00:00 2026-05-15T15:22:43+00:00

I have Drag/Drop functionality in my page embedded using YAHOO.js which is initalized at

  • 0

I have Drag/Drop functionality in my page embedded using YAHOO.js which is initalized at load of the page. When ‘alert’ is put in the init function, the Drag/Drop is working otherwise
it is not. Using Firebug I had debugged the code and seen when init function is called but not looping through the function when no alert is put.
This function should work when ALT key is pressed. I am using velocity template engine over JavaScript.
Sample code:

<script type="text/javascript" language="JavaScript">


var myLogger;
  var dd1, ddTrashCan;  // draggable div objs

  #if ($displayOptions.isDoDragDropJavaScript())
      YAHOO.util.Event.addListener(window, "load", DD_TestInit);      
  #end

  function display(data) {
   var output = "<div>" + data.text + "</div>";
   element.innerHTML=output;
}
  function DD_TestInit() {
    #if ($showLoggerDiv)
      initLogger();
    #end  
//display("date");
initDragObjects();


}

  function logMsg(strMsg) {
    if (myLogger)
      myLogger.debug(strMsg);
  }
  
  function initDragObjects() {
  
  //alert('---');
  
    if (dd1) dd1.unreg();
    if (ddTrashCan) ddTrashCan.unreg();

    YAHOO.util.DDM.mode = YAHOO.util.DDM.POINT;
    YAHOO.util.DDM.clickTimeThresh = 10;
    
    ## init constant drag objects, draggable div and droppable trash, resp.
    dd1 = new lineSched_Draggable("dragDiv1");  
    ddTrashCan = new lineSched_Droppable("TrashCan");
  }

What I had found is whenever I put an alert or call any window.open() this works fine.
Any clue whats happening here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T15:22:44+00:00Added an answer on May 15, 2026 at 3:22 pm

    There is timer event which is delaying the process.My feeling is that this is a timing issue. The page is not fully in place when on load. The alert slows the process down, essentially the page is in place by the time the user clicks Ok on the alert. Clearly, we can’t deploy the app with an alert. But, we can look into different places to put the initialization. We can try to place it the same place I added the timing, when the page receives the last table. The page should be fully formed at this point and the function should work properly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.