• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 614
  • Last Modified:

JQuery Drag and Drop

Hi,
I want to use JQuery drag and drop ui component. I want to give each div an id. Is there a way that I can detect in PHP the Divs that have been dropped on to a certain area?
Cheers
John
0
jdav357
Asked:
jdav357
  • 2
1 Solution
 
Nithyanandhan_TCommented:
You cannot directly handle the drag/drop events in PHP.. because event will be in client side while PHPs scope is only in the server side.

Instead, you can catch those events in JQuery and make server side call to trigger corresponding PHP.

You can make PHP / any server side  call using AJAX(JQuery has functions to handle AJAX calls aswell.. it will make your job easy).

You can also make normal HTTP call to trigger your PHP class... but usually for these kind of scenario AJAX will be more suitable..

let me know if it helps!!
0
 
jdav357Author Commented:
I know what you mean, I am just not sure how to implement it. The effect I am trying to achieve is a user can select different objects they want by moving them from one place to another, when they move it the event will save the users preference.

Do you know of any links etc, which could point me in the right direction?

Many thanks for your help


John
0
 
Nithyanandhan_TCommented:
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now