Code Behind Not Seeing My Dropped Image URL

Code Behind Not Seeing My Dropped Image URL

Hi,
 
I have written some jquery which basically allows the end user to drag a div with an image in and drop it into another div with an image in and the image src is set. My problem is I have a save button and in the code behind I write to a database the image urls. For some reason even though on screen I can see the image in the image control the imageurl is the default load value and not the image url. Here is my code:-
 
  1. function
  • pageLoad(){
  • $(
  • '#divPreview').draggable({ helper: "clone",
  • cursor:
  • "move"
  • });
  • $(
  • '.divCleanTools').draggable({ helper: "clone",
  • cursor:
  • "move"
  • });
  • $(
  • '.divCleanTools').droppable({
  • drop:
  • function (event, ui) {
  • var $imagedrop = $('#'+$(event.target).attr('id')).find('img').map(function () {
  • var $imagedrag = $('#divPreview').find('img').map(function () {
  • return this.src;
  • }).get();
  • this.src = $imagedrag;
  • });
  • }
  • });
  • $(
  • '#divBin').droppable({
  • drop:
  • function (event, ui) {
  • var $imagedrag = $('#'+ui.draggable.attr('id')).find('img').map(function () {
  • this.src = "Symbols/Blank.jpg";
  • })
  • }
  • });
  • };
  •  
    Does anyone know why it is not the new imageurl which I assigned in jquery?
     
    Many Thanks,
     
    Jiggy!