| | |
Drag and Drop
Please support our VB.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
Join Date: Dec 2006
Posts: 20
Reputation:
Solved Threads: 0
Hi Guys,
I have an aspx page called Main.aspx which has several text boxes and a button.
When I click on this button, it opens up a popup window called SubMain.aspx
I want to drag and drop those text boxes from the Main.aspx page to this new popup window.
Is it possible in asp.net
Any code will be helpful, hopefully:cheesy:
Michael Ngobeni
I have an aspx page called Main.aspx which has several text boxes and a button.
When I click on this button, it opens up a popup window called SubMain.aspx
I want to drag and drop those text boxes from the Main.aspx page to this new popup window.
Is it possible in asp.net
Any code will be helpful, hopefully:cheesy:
Michael Ngobeni
•
•
•
•
Hi Guys,
I have an aspx page called Main.aspx which has several text boxes and a button.
When I click on this button, it opens up a popup window called SubMain.aspx
I want to drag and drop those text boxes from the Main.aspx page to this new popup window.
Is it possible in asp.net
Any code will be helpful, hopefully:cheesy:
Michael Ngobeni
'**************************************
' Name: Drag-and-Drop feature for Table
' Rows
' Description:Simple code to allow drag-
' and-drop of records between 2 different
' tables.
' By: ahWind
'
' Assumes:Copy and paste the following c
' ode to an ASP Page.
To see the result, highlight a record from Table 1 Then drag over to Table 2 or vice-versa.
'
'This code is copyrighted and has ' limited warranties.Please see http://w
' ww.Planet-Source-Code.com/vb/scripts/Sho
' wCode.asp?txtCodeId=7413&lngWId=4 'for details. '**************************************
<HTML>
<BODY>
<B><U>TABLE 1</U></B>
<TABLE id="TABLE1" border=1>
<%
For Row=1 To 4
Response.Write "<TR id='T1R" & Row & "' style='background-color:yellow' ondragstart='Javascript:FromCtrl=this' ondragover='fnClone(this)'>"
For Col=1 To 3
Response.Write "<TD>T1R" & Row & "C" & Col & "</TD>"
Next
Response.Write "</TR>"
Next
%>
</TABLE>
<BR>
<B><U>TABLE 2</U></B>
<TABLE id="TABLE2" border=1>
<%
For Row=1 To 4
Response.Write "<TR id='T2R" & Row & "' style='background-color:blue' ondragstart='Javascript:FromCtrl=this' ondragover='fnClone(this)'>"
For Col=1 To 4
Response.Write "<TD>T2R" & Row & "C" & Col & "</TD>"
Next
Response.Write "</TR>"
Next
%>
</TABLE>
</BODY>
</HTML>
<SCRIPT>
var FromCtrl
function fnClone(ToCtrl){
if (FromCtrl != null) {
var FromTable = FromCtrl.parentNode.parentNode
var ToTable = ToCtrl.parentNode.parentNode
if (FromTable != ToTable) {
var NewRow = ToTable.insertRow()
var oCloneNode = FromCtrl.cloneNode(true)
NewRow.swapNode(oCloneNode)
FromCtrl.removeNode(true)
FromCtrl = null
}
}
}
</SCRIPT>
•
•
Join Date: Dec 2006
Posts: 20
Reputation:
Solved Threads: 0
Something like that.
I already had this code though.
This is one page. but I want to be able to drag from oen page to another.
I'm not too sure if this is possible on the browser.
Thanks for you help.
I already had this code though.
This is one page. but I want to be able to drag from oen page to another.
I'm not too sure if this is possible on the browser.
Thanks for you help.
•
•
•
•
Something like this ??
'************************************** ' Name: Drag-and-Drop feature for Table ' Rows ' Description:Simple code to allow drag- ' and-drop of records between 2 different ' tables. ' By: ahWind ' ' Assumes:Copy and paste the following c ' ode to an ASP Page. To see the result, highlight a record from Table 1 Then drag over to Table 2 or vice-versa. ' 'This code is copyrighted and has ' limited warranties.Please see http://w ' ww.Planet-Source-Code.com/vb/scripts/Sho ' wCode.asp?txtCodeId=7413&lngWId=4 'for details. '************************************** <HTML> <BODY> <B><U>TABLE 1</U></B> <TABLE id="TABLE1" border=1> <% For Row=1 To 4 Response.Write "<TR id='T1R" & Row & "' style='background-color:yellow' ondragstart='javascript:FromCtrl=this' ondragover='fnClone(this)'>" For Col=1 To 3 Response.Write "<TD>T1R" & Row & "C" & Col & "</TD>" Next Response.Write "</TR>" Next %> </TABLE> <BR> <B><U>TABLE 2</U></B> <TABLE id="TABLE2" border=1> <% For Row=1 To 4 Response.Write "<TR id='T2R" & Row & "' style='background-color:blue' ondragstart='javascript:FromCtrl=this' ondragover='fnClone(this)'>" For Col=1 To 4 Response.Write "<TD>T2R" & Row & "C" & Col & "</TD>" Next Response.Write "</TR>" Next %> </TABLE> </BODY> </HTML> <SCRIPT> var FromCtrl function fnClone(ToCtrl){ if (FromCtrl != null) { var FromTable = FromCtrl.parentNode.parentNode var ToTable = ToCtrl.parentNode.parentNode if (FromTable != ToTable) { var NewRow = ToTable.insertRow() var oCloneNode = FromCtrl.cloneNode(true) NewRow.swapNode(oCloneNode) FromCtrl.removeNode(true) FromCtrl = null } } }
</SCRIPT>
Some other sources:
Using Javascript in ASP.NET:
http://www.codeproject.com/aspnet/drag_drop.asp
Similar Thread:
http://www.daniweb.com/techtalkforums/thread25903.html
Other links
http://www.codeproject.com/shell/explorerdragdrop.asp
http://www.codeproject.com/useritems...op_Part-1_.asp
Using Javascript in ASP.NET:
http://www.codeproject.com/aspnet/drag_drop.asp
Similar Thread:
http://www.daniweb.com/techtalkforums/thread25903.html
Other links
http://www.codeproject.com/shell/explorerdragdrop.asp
http://www.codeproject.com/useritems...op_Part-1_.asp
![]() |
Similar Threads
- drag & drop (Assembly)
- create an app drag & drop controls in asp.net (ASP.NET)
- can't drag & drop in explorer + can't open link in new window (Windows NT / 2000 / XP)
Other Threads in the VB.NET Forum
- Previous Thread: background image property
- Next Thread: Help Needed in choosing topic for contest
| Thread Tools | Search this Thread |
.net .net2008 2005 2008 access account add application array basic beginner browser button buttons center check click code combo cpu crystalreport cuesent database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic dropdownlist excel exists fade file-dialog filter forms ftp generatetags html images input insert intel listview mobile module monitor mysql net number open output panel passingparameters picturebox picturebox2 port print printing printpreview problem regex reuse right-to-left searchvb.net select settings shutdown socket sqldatbase sqlserver storedprocedure survey tcp temperature textbox timespan transparency trim txttoxmlconverter user usercontol vb vb.net vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet vista visual visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode xml year





