473,378 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Submitting data to database after drag and drop.

Hi , I am really confused that how to submitted data back to the database with respective to the drag and drop happened on the client level. Below is my detailed problem.

I have three DIV containers containting various div's holiding the value coming from the database. So on the 1st load all the div containers have the values coming from the database. As soon as the data populated I provide the functionality of moving a div from one container to another. SO after all the drag and drops I want the database to be updated as values in 1st div container have different status that value in 2nd div container.

So just want some way to dynamically change the status as soon as div moves to different container. Following is some part of my code that may help understanding the problem.

Expand|Select|Wrap|Line Numbers
  1. <fieldset id="Demo4"> 
  2. <div> 
  3. <div class="DragContainer" id="DragContainer4" overclass="OverDragContainer"> 
  4.  
  5. <?php
  6. for ($i = 0; $i < $n; $i ++)
  7.     {
  8.     ?>    
  9.         <div class = "DragBox" id="Item<?php echo $i ?>" overclass="OverDragBox" dragclass="DragDragBox"><input type="text" name ="team<?php echo $i ?>" value="<?php echo $team2['employee_name'] ?>"  size = "9""></div>
  10.   <?php 
  11. $team2 = pg_fetch_assoc($team1);
  12.   } 
  13. ?>
  14. </div>
  15. <div class="DragContainer" id="DragContainer5" overclass="OverDragContainer"> 
  16. <?php
  17. for ($J = 0; $J < $nn; $J ++)
  18.     {
  19.     ?>    
  20.         <div class = "DragBox" id="Item<?php echo $i ?>" overclass="OverDragBox" dragclass="DragDragBox"><input type="text" name ="team<?php echo $i ?>" value="<?php echo $already_allocated2['employee_name'] ?>"  size = "9""></div>
  21.   <?php 
  22. $already_allocated2 = pg_fetch_assoc($already_allocated1);
  23. $i = $i + 1;
  24.   } 
  25. ?>
  26. </div> 
  27. <div class="DragContainer" id="DragContainer6" overclass="OverDragContainer"> 
  28. </div>
  29. </div>
  30. </fieldset>
  31.  
Many Thanks in advance
Oct 24 '09 #1
3 2928
Dormilich
8,658 Expert Mod 8TB
all you can do is extending the javascript to notify the database of any changes it makes. (guess that’s an AJAX job)
Oct 25 '09 #2
Is there no way to do it by php ? as dnt knw anything abt AJAX
Oct 25 '09 #3
Dormilich
8,658 Expert Mod 8TB
PHP will have to do the work on the server side, but anything you do client side (in the browser), cannot be handled by PHP.
Oct 25 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: joe | last post by:
I have an image database that I'd like to populate by dragging an image off the desktop and dropping onto a form (cut/paste would work equally as well) Any suggestions? Thanks, Joe
0
by: Dwayne Gaddy | last post by:
Hey all, I have a windows form with a list boxes. I have data bound the list boxes with data from my sql database. I want to use drag and drop to allow users to choose different options from the...
1
by: Morys Kenworthy | last post by:
If I drag and drop a SQL table to a web form I get a connection and adapter created. Nice! If I drag a Visual Foxpro table to a web form or a table from the IBM AS/400 I get an error message:...
6
by: Jon Davis | last post by:
I like the drag-and-drop accessibility of dragging a table to a Web Forms designer and seeing a SqlDataAdapter automatically created for me.. being able to create a DataSet from that is fun and...
6
by: jojobar | last post by:
Hello, I look at the asp.net 2.0 web parts tutorial on the asp.net web site. I tried to run it under firefox browser but it did not run. If I want to use this feature in a commercial product...
6
by: P. Prosper | last post by:
Hello, Sorry for the cross-posting, I first posted this message to the vb.6 NG (wrong group) <g>. Are there any add-in or tools out there (for VB.NET ) that would allow one to drag and drop...
3
by: Uma sakshi | last post by:
Hi I have one VB.NET application,in that application i have one datagrid control.The datagrid control contains somedata.I want to copy the data in a particular cell and paste it into my C#.NET...
3
by: petermichaux | last post by:
Hi, I am trying to put together the last major pieces of my project's puzzle. This is more website/client-side architecture than JavaScript syntax but I hope this is a good place to ask. I'm a...
1
by: SteveDouglas | last post by:
Hi all, I am currently writing an application in VB.NET that has a lot of controls (treeviews/listviews/labels and so forth) that represent "things" that need to be draggable from place to place,...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.