Results 1 to 4 of 4
- 01-08-2012, 01:50 PM #1
Member
- Join Date
- Jan 2012
- Location
- Serbia
- Posts
- 2
- Rep Power
- 0
Grab and replace (exchange) value
Based on this example:
Dynamic Drag’n Drop With jQuery And PHP
I tried to make a replacement football players in the right manager
in link belowe:
http://www.sportskevesti.co/component/m ... /index.php
this is what i can do (sort). and this is something, but not good enough. Can someone help me how to this technique(jquery) make a real change of players(substitution) instead of sorting, (example in upper link)
thanks
- 01-08-2012, 01:58 PM #2
Re: Grab and replace (exchange) value
Is this a java programming problem?
If so, please post your code and your questions.
- 01-08-2012, 02:13 PM #3
Member
- Join Date
- Jan 2012
- Location
- Serbia
- Posts
- 2
- Rep Power
- 0
Re: Grab and replace (exchange) value
Sorry
(this is my first java attempts on this example)
I try to make online sooccer manager, and for that, i mast make soccer player substitution.
Becose of that, i search for Drag and Drop rutine, and i find this example:
Dynamic Drag’n Drop With jQuery And PHP:
The JavaScript:
---------------------------------
PHP part of code:<script type="text/javascript">
$(document).ready(function(){
$(function() {
$("#contentLeft ul").sortable({ opacity: 0.6, cursor: 'move', update: function() {
var order = $(this).sortable("serialize") + '&action=updateRecordsListings';
$.post("updateDB.php", order, function(theResponse){
$("#contentRight").html(theResponse);
});
}
});
});
});
</script>
----------------------------------
This is drag, drop sortable example<?php
require("db.php");
$action = $_POST['action'];
$updateRecordsArray = $_POST['recordsArray'];
if ($action == "updateRecordsListings"){
$listingCounter = 1;
foreach ($updateRecordsArray as $recordIDValue) {
$query = "UPDATE records SET recordListingID = " . $listingCounter . " WHERE recordID = " . $recordIDValue;
mysql_query($query) or die('Error, insert query failed');
$listingCounter = $listingCounter + 1;
}
echo '<pre>';
print_r($updateRecordsArray);
echo '</pre>';
echo 'If you refresh the page, you will see that records will stay just as you modified.';
}
?>
And I need to do an example in which I will replace the players and not move one below the other.
Thanks for the quic answer :)
- 01-08-2012, 02:27 PM #4
Similar Threads
-
How to grab directory from a JFileChooser?
By blackbird in forum AWT / SwingReplies: 5Last Post: 07-16-2011, 07:03 AM -
Fastest and most CPU efficient way to grab pixel information from a BufferedImage
By crikey in forum Advanced JavaReplies: 10Last Post: 07-08-2011, 08:21 AM -
how to grab info from array
By skuzzie in forum New To JavaReplies: 3Last Post: 12-09-2010, 01:26 PM -
Trying to login to a website then grab another page
By DaveTheAve in forum New To JavaReplies: 6Last Post: 04-14-2010, 09:44 PM -
grab the textfile
By Sticks_ll in forum New To JavaReplies: 3Last Post: 03-31-2009, 01:23 PM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks