473,513 Members | 2,524 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DIV around TR

Hi
I've downloaded the script at
http://www.walterzorn.com/dragdrop/d...p_e.htm#config

for drag and drop feature. I tried enclosing <div></div> tags around
<table> so that the entire table can be dragged. However, it doesn't
work for individual rows. To give an example the following works:

<html>
<head>
</head>
<body>
<script type="text/javascript" src="wz_dragdrop.js"></script>

<div id="name1" style="position:absolute;">
<table border=1>
<TR><TD> Hello there </TD> <TD> how are you</TD></TR>
<TR><TD> hello3 </TD><TD>how are you 3</TD></TR>
</table>
</div>

<hr>
<div id="name2" style="position:absolute;">
<table id="name2" border=1>
<TR><TD> Hello there2 </TD> <TD> how are you2</TD></TR>
</table>
</div>
<div id="name3" style="position:absolute;"> hello there </div>
<script type="text/javascript">
<!--

SET_DHTML("name1", "name2", "name3");

//-->
</script>
</body>
</html>

However the following doesn't work:

<html>
<head>
</head>
<body>
<script type="text/javascript" src="wz_dragdrop.js"></script>
<table border=1>
<div id="name1" style="position:absolute;">
<TR><TD> Hello there </TD> <TD> how are you</TD></TR>
<TR><TD> hello3 </TD><TD>how are you 3</TD></TR>
</div>
</table>
<hr>
<table id="name2" border=1>
<div id="name2" style="position:absolute;">
<TR><TD> Hello there2 </TD> <TD> how are you2</TD></TR>
</div>
</table>

<div id="name3" style="position:absolute;"> hello there </div>
<script type="text/javascript">
<!--

SET_DHTML("name1", "name2", "name3");

//-->
</script>
</body>
</html>
~

Jul 23 '05 #1
10 8852
Hi Soup,

First of all, in javascript you can't move individual table rows. So
yes, your first example will work, but not the second. What you could
do is make a div element within the td element:

..
..
<td>
<div id = "name4">text</div>
</td>
..
..

Something like that. However, if you drag it, it'll stay within that
element. If you wanted to be able to separate that element, you're
gonna need to make the div element outside of the table.

so***********@yahoo.com wrote:
Hi
I've downloaded the script at
http://www.walterzorn.com/dragdrop/d...p_e.htm#config

for drag and drop feature. I tried enclosing <div></div> tags around
<table> so that the entire table can be dragged. However, it doesn't
work for individual rows. To give an example the following works:

<html>
<head>
</head>
<body>
<script type="text/javascript" src="wz_dragdrop.js"></script>

<div id="name1" style="position:absolute;">
<table border=1>
<TR><TD> Hello there </TD> <TD> how are you</TD></TR>
<TR><TD> hello3 </TD><TD>how are you 3</TD></TR>
</table>
</div>

<hr>
<div id="name2" style="position:absolute;">
<table id="name2" border=1>
<TR><TD> Hello there2 </TD> <TD> how are you2</TD></TR>
</table>
</div>
<div id="name3" style="position:absolute;"> hello there </div>
<script type="text/javascript">
<!--

SET_DHTML("name1", "name2", "name3");

//-->
</script>
</body>
</html>

However the following doesn't work:

<html>
<head>
</head>
<body>
<script type="text/javascript" src="wz_dragdrop.js"></script>
<table border=1>
<div id="name1" style="position:absolute;">
<TR><TD> Hello there </TD> <TD> how are you</TD></TR>
<TR><TD> hello3 </TD><TD>how are you 3</TD></TR>
</div>
</table>
<hr>
<table id="name2" border=1>
<div id="name2" style="position:absolute;">
<TR><TD> Hello there2 </TD> <TD> how are you2</TD></TR>
</div>
</table>

<div id="name3" style="position:absolute;"> hello there </div>
<script type="text/javascript">
<!--

SET_DHTML("name1", "name2", "name3");

//-->
</script>
</body>
</html>
~


Jul 23 '05 #2
web.dev wrote:
First of all, in javascript you can't move individual table rows.


why not?

document.onclick = function() {
var row1 = document.getElementById("one");
row1.parentNode.insertBefore(row1,null);
};

<table>
<tr id="one"><td>One</td></tr>
<tr id="two"><td>Two</td></tr>
<tr id="three"><td>Three</td></tr>
</table>

Daniel
Jul 23 '05 #3
web.dev wrote on 17 jun 2005 in comp.lang.javascript:
First of all, in javascript you can't move individual table rows.


<table id=t>
<tr><td>World</td></tr>
<tr><td>Hello</td></tr>
</table>

<script type='text/javascript'>
var t = document.getElementById('t').firstChild
x=t.firstChild.cloneNode(true);
t.firstChild.removeNode(false);
t.appendChild(x)
</script>

Perhaps it can be done even simpler?

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #4
Using the library I'm unable to move a table row <TR> if not a <TD>.
Someone please look into the code and let me know. Many thanks!

Jul 23 '05 #5
wrote on 17 jun 2005 in comp.lang.javascript:
Using the library I'm unable to move a table row <TR> if not a <TD>.
Someone please look into the code and let me know. Many thanks!


please 1:
always quote on usenet, it's netiquettte.

please 2:
what library are you talking about?

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #6


Evertjan. wrote:
wrote on 17 jun 2005 in comp.lang.javascript:
Using the library I'm unable to move a table row <TR> if not a <TD>.
Someone please look into the code and let me know. Many thanks!


please 1:
always quote on usenet, it's netiquettte.

please 2:
what library are you talking about?


I was referring to Walter Zorn's library. Anyway, could you tell me how
to save the drag and drop changes to a database?
Thank you

Jul 23 '05 #7
wrote on 17 jun 2005 in comp.lang.javascript:
Evertjan. wrote:
wrote on 17 jun 2005 in comp.lang.javascript:
> Using the library I'm unable to move a table row <TR> if not a <TD>.
> Someone please look into the code and let me know. Many thanks!
please 1:
always quote on usenet, it's netiquettte.

please 2:
what library are you talking about?


I was referring to Walter Zorn's library.


I am not familiar with that.
Anyway, could you tell me how
to save the drag and drop changes to a database?


You would need to do that by serverside form-submission, methinks.

What is your serverside platform?
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #8


Evertjan. wrote:
wrote on 17 jun 2005 in comp.lang.javascript:
Evertjan. wrote:
wrote on 17 jun 2005 in comp.lang.javascript:

> Using the library I'm unable to move a table row <TR> if not a <TD>.
> Someone please look into the code and let me know. Many thanks!

please 1:
always quote on usenet, it's netiquettte.

please 2:
what library are you talking about?


I was referring to Walter Zorn's library.


I am not familiar with that.
Anyway, could you tell me how
to save the drag and drop changes to a database?


You would need to do that by serverside form-submission, methinks.

What is your serverside platform?


It's perl/apache. I was thinking the DOM could be retrieved and saved
to
a DB LOB field. Is it possible? Thanks!

Jul 23 '05 #9
Ah, I apologize for not being clear. Evertjan, yes you are correct,
you can indeed move elements that way. But, what soup wants to do is a
drag and drop functionality using that library. Therefore, there is no
way to move table row elements.

Jul 23 '05 #10
wrote on 17 jun 2005 in comp.lang.javascript:
What is your serverside platform?
It's perl/apache.


Not my kind of soup. I'm into asping.
I was thinking the DOM could be retrieved and saved
Retrieving the DOM?
Isn't the DOM is a clientside dynamic structure,
dependent on the type of browser?
to a DB LOB field. Is it possible? Thanks!


See above. Don't know nothing avout lobbing.
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
5118
by: Vigil | last post by:
I am trying to put a 7px border around a page. If the contents don't fill up the viewport, then the border must appear all around the viewport. If the page is larger than the viewport, then the border must wrap around the contents. Both should result in the border around the complete page, no matter the size, so that none of the bgcolor bleeds...
7
23000
by: lawrence | last post by:
In my style sheet I've set the links like this: a:link{ text-decoration:none; } I did that for the pseudo classes and I also did that for the image tag. Yet there are still link lines around the images. Why? It's on this page:
23
52090
by: Bob Bedford | last post by:
I've a table. The table must not have any border. The TR (every line) must have a border, but not the lines between cells. The TR.pages must have no border. so .mytable{border:0px;} ..mytable tr{border:1px solid #000000;} ..mytable th{border:0px;}
0
1162
by: Al Dente | last post by:
Round round get around I get around Yeah Get around round round I get around I get around Get around round round I get around From town to town Get around round round I get around I'm a real cool head Get around round round I get around
14
12880
by: Steve Jorgensen | last post by:
Recently, I tried and did a poor job explaining an idea I've had for handling a particular case of implementation inheritance that would be easy and obvious in a fully OOP language, but is not at all obvious in VBA which lacks inheritance. I'm trying the explanation again now. I often find cases where a limited form of inheritance would...
3
4739
by: Simon Harvey | last post by:
Hi, In my application I get lots of different sorts of information from databases. As such, a lot of information is stored in DataSets and DataTable objects. Up until now, I have been passing around chunks of data in DataTables/DataSets, simply because that was the format that they were in when the data was taken from the database. Now,...
4
12304
by: Stuart Norris | last post by:
Dear Readers, I am attempting to draw box around some text using unicode on multiline label. The label is forty characters wide and 12 lines deep. I have been trying to draw a box around text (centered in the label) on this label. My font on this label is Courier new - hence fixed width character cells.
1
4809
by: Mike | last post by:
I am consuming a web service hosted by one of our clients. One of the string properties of the object I am creating to pass to their web service is called CustomerName. The XML they re receiving I just a standatd xml elemnt: <CustomerName>Joe Friday</CustomerName> The client has told me that the customer name, Joe Firday, needs to have...
8
12084
by: UJ | last post by:
I have a table with multiple cells and I want to draw a box around the entire table but not around the individual cells. How do I do that? TIA - Jeff.
6
17096
by: natkw1 | last post by:
Hi all, I'm new to C and kind of confused on this. I've had a look around this group for suggestions but still not sure why the warning is occurring. What I've done is this <code snip> void foo(char loc) {
0
7178
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7397
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7128
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5103
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4759
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3255
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3242
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
817
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
473
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.