Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Mar 07, 2007 11:23
open dhtmlx forum
When the user drags and drop a note we catch the event ( tondrag() )and right there we display a dialog b...

When the user drags and drop a note we catch the event ( tondrag() )and right there we display a dialog box (IFRAME) where we need to capture some data from the user and run some validations. Depending on the outcome of this we will allow/deny the drag and drop operation (returning true/false).

The problem we're facing is that we have no way of having the tondrag() wait until the user finishes interacting with the IFRAME and as you probably know javascript doesn't give you a lot of mechanisms to put the parent window's thread to sleep while the IFRAME keeps executing.

Anyway, one way to solve this would be to return false in the handler but then be able to programmatically invoke the event once more once we know the result of the user interaction with the IFRAME.

Is this possible with the tool or what other approaches do you suggest?
Answer posted on Mar 07, 2007 11:24

>Anyway, one way to solve this would be to return false in the handler

> but then be able to programmatically invoke the event once more once

> we know the result of the user interaction with the IFRAME.

 
Yes it's possible. The tree has moveItem command which fully imitates the onDrag event (basically it gives even more possibilities than standard d-n-d). It uses all drag-n-drop settings, and fires onDrag and onDrop events as well.

Please refer to samples/pro_move_item.html

 
Also the latest build of the tree supports lockTree command which blocks any interaction with tree - it is useful to prevent firing of any new actions while processing your form.

> Is this possible with the tool or what other approaches do you suggest?

If you're designing only for IE, it supports "modal dialogs" - which are kind of popup windows, which suspend javascript in main window, while popup will not be closed
Answer posted by Stanislav (Support) on Dec 09, 2014 04:41

To find more precise comments upon this issue, we can offer you read about apps touch and free php ajax grid.