Hi Ibnu,
You have probably hidden the drop area behind an if-statement and the system doesn't generate the drop area in the HTML page when the if-statement prevents the drop area from showing.
When you move the widget (webblock) with the javascript inside the same inf-statement together with the drop area, the javascript will be executed only when the drop area is generated and not the other way around.
Make also sure that the javascript part is generated after the drop area (this has to be existing for the JavaScript to work correctly).
Kind regards,
Remco