jQuery UI Widgets › Forums › Navigation › Tree › how to realize database change before screen change when dragdrop
Tagged: #jquery-tree, javascript tree, jqwidgets tree, Tree
This topic contains 5 replies, has 2 voices, and was last updated by Hristo 7 years, 4 months ago.
-
Author
-
When drag and drop(options already set ok,include dragEnd),the screen will show the change immediately,I don not want this.I want to realize: when drag and drop,a dialog show,users fill in the form then click submit,ajax change the database,this all complete,then the screen can show the drag change.How can i realize this? thank you!
Hello fanning,
Could you clarify what you want to achieve?
Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comI want to achieve:use jqxtree,set allowDrag and allowDrop true.When drag an item and drop it,the tree do not change immediately,a dialog include a form pop-up,fill in the form and press submit,database change through ajax,all done,dialog close,then the tree show the change(new tree state caused by drag and drop)
Hello fanning,
Unfortunately, there is no such option that you could open the ‘pop-up’, only I could suggest you try to use
confirm('Request');
.
Please, take a look at this example:
http://jsfiddle.net/txhi/09exp8mx/Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comThank you! What I mean just like your example, but, I need a form to record more information, not just confirm. That is, I need a dialog which can suspend process like ‘confirm’, ‘pop-up’ option is not necessary, I can invoke other dialog widgets through jquery myself.
If this can’t be archieved, the second solution:
use normal dialog widgets(don’t suspend process), fill in the form and submit, it can reappear drag and drop animation which didn’t show when I darg and drop immediately.I don’t know how to achieve? So sorry to trouble you, thank you!
Hello fanning,
Unfortunately, as I said in the previous post it is not possible to achieve with such options. It should freeze the drag process and open a dialog for requests.
Another way that I would like to suggest you bind to select event of the jqxTree and do your logic.
As an alternative you could useprompt();
, two, three or more and with them, you will collect all needed data.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.