I have function on page load -this fun accept the values of image from database like ht,width,url n etc...& I write code in javascript n in jquery for moving image... & its working fine
& I add 1 fileupload control. & 1 Save button...after click on save button,the uploaded image will get save into database...
but after save to database all image are not working for move purpose...
Please help me..I added code here
This is my NewSave.aspx page code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NewSave.aspx.cs" Inherits="NewSave" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title>DOM Drag Demo</title> <style type="text/css"> <!-- @import "/_common/demo.css"; body { margin:0px; } #b { cursor:move; cursor:hand; } #g { cursor:hand; cursor:move; } #id1 { cursor:hand; cursor:move; } #pbox { position:absolute; left:20px; top:20px; width:700px; height:700px; border:1px dashed #333399; }--></style> <script language="javascript" src="dom-drag.js"></script> <script language="javascript"> var reportBox, iReportCount = 0; // debugger; window.onload = function () { if (document.all || document.getElementById) { var hdnfield = document.getElementById('hdnImgId').value; var myString = document.getElementById('hdnvalue').value; var strlen = myString.length; myString = myString.slice(0, strlen - 1); var mySplitResult = myString.split(","); for (var i = 0; i < mySplitResult.length; i++) { var id1 = mySplitResult[i]; var oB = document.all ? document.all[id1] : document.getElementById(id1); reportBox = document.all ? document.all["oDragstart"] : document.getElementById("oDragstart") reportBox1 = document.all ? document.all["oDragEnd"] : document.getElementById("oDragEnd") reportBox2 = document.all ? document.all["oDrag"] : document.getElementById("oDrag") Drag.init(oB); var o = Drag.obj = this; var o1 = this.Drag.obj; var o2 = this.name; var o3 = Drag.obj.name; oB.onDragStart = function (x, y) { reportDragStart(o.Drag.obj.id, x, y); } oB.onDragEnd = function (x, y) { reportDragEnd(o.Drag.obj.id, x, y); } oB.onDrag = function (x, y) { reportDrag(o.Drag.obj.id, x, y); } } function reportDragStart(who, x, y) { reportBox.value += who + " | onDragStart " + " (" + x + "," + y + ")\n" } function reportDragEnd(who, x, y) { reportBox1.value += who + " | onDragEnd " + " (" + x + "," + y + ")\n" } function reportDrag(who, x, y) { reportBox2.value = who + " | onDrag " + " (" + x + "," + y + ")" } //} } } </script></head> <body> <form id="form1" runat="server"> <div> <textarea id="oDragstart" style="width: 300px; height: 200px;" wrap="off" runat="server"></textarea> <textarea id="oDragEnd" style="width: 300px; height: 200px;" wrap="off" runat="server"></textarea> <input type="text" id="oDrag" style="width: 300px;" runat="server" /> <asp:TextBox ID="txtName" runat="server" Width="95px"> </asp:TextBox> <asp:FileUpload ID="FileUpload1" runat="server" /> <asp:Label ID="lblMessage" runat="server"> </asp:Label><asp:Button ID="Button1" runat="server" Text="SAVE" OnClick="Button1_Click" /> <asp:HiddenField ID="hdnImgId" runat="server" /> <asp:HiddenField ID="hdnvalue" runat="server" /> </div> </form></body></html>
*****************************************************************************