aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Drag Images from One Table Column to Other Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Drag Images from One Table Column to Other" Watch "Drag Images from One Table Column to Other" New topic
Author

Drag Images from One Table Column to Other

nirav soni parmar
Greenhorn

Joined: Aug 22, 2006
Posts: 15
Hi...

I am new in Java Script.

I have one Image in One Table's Column and I want to Drag it and Drop it to any Other column.

That means I want output like GOOGLE home page.

Please Help me on that...
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Look into drag and drop with http://script.aculo.us/

Eric
nirav soni parmar
Greenhorn

Joined: Aug 22, 2006
Posts: 15
Thank You.. For Reply.

But I am not using AJAX. So I want Simple Code for Drag & Drop Images.
Bogdan Brinzarea
author
Greenhorn

Joined: Aug 22, 2006
Posts: 25
Script.aculo.us is built on Prototype which contains the AJAX core. Script.aculo.us adds the visual effects such as drag'n'drop.

As you don't want any additional AJAX functionality and you're interest is focused only on drag and drop script.aculo.us could be larger that you need to,so I recommend another library focused on your needs:

http://www.walterzorn.com/dragdrop/dragdrop_e.htm

Bogdan
nirav soni parmar
Greenhorn

Joined: Aug 22, 2006
Posts: 15
Thank You for Your Responce..

Now I have one Image in One Column of Table and I want to Drag and Drop that Image to another Column Of Table.

I can Drag & Drop Image Anywhere On Screen, but not on specific Column.

That means When i draging the Image if Image is come on any column of Table and I drop that Image there then Image must display on specified Column.

So, Please Help On That.

Thank You...
Bogdan Brinzarea
author
Greenhorn

Joined: Aug 22, 2006
Posts: 25
I think what you are trying to do is to implement a mechanism where each column acts like a container and where each container's content can be dragged and dropped between containers and perhaps some additional actions (sorting) can be done within a container.

I know that these concepts are nicely implemented in script.aculo.us with Draggables and Droppables (maybe this is not what you want to hear).

Another library can be found at:
http://neb.net/playground/dragdrop/ or
http://cyberdummy.co.uk/test/dd.php

Bogdan
nirav soni parmar
Greenhorn

Joined: Aug 22, 2006
Posts: 15
Thank You.

I think that link is solve my Problem.

I try to DO it.

and if any more problem is occure then i ask it..
nirav soni parmar
Greenhorn

Joined: Aug 22, 2006
Posts: 15
Hello,

I have HTML Code as below...

..................................
<BODY>

<table width=100% border=0>

<tr>
<td>

<table border=1>

<tr>
<td width="300"><IMG id="moveMe"
SRC="C:\Training\Web\Picture\trial_0.gif"></td>

<td width="300"></td>

</tr>

</table>

</td>
</tr>

</table>

</BODY>

..........................

As Above Code I want to Drag Image From column ONE to column TWO.

I wannt to use Mouse Events on that.

Can You Please Give me an Simple JScript code for That..

Thank You....
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Have you looked at: http://wiki.script.aculo.us/scriptaculous/show/Demos

The lists or the droppables are what you need. You can easily add an image into the lists.

Eric
nirav soni parmar
Greenhorn

Joined: Aug 22, 2006
Posts: 15
I dont want to use AJAX for that...

On that link they used AJAX for that..
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
THEY ARE NOT USING AJAX as it has been already pointed out...AJAX IS JAVASCRIPT TO BEGIN WITH!

That is a library that has Ajax Functionality in it. You are not using the Ajax functionality. You are using the Drag and Drop portion on the code. Yes Ajax can be connected to it, but YOU DO NOT have to do it.

Trust me, you just have to link the js files and add two lines of code and bam it will be working for you and your boss will think you are a genious.

Eric
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

Originally posted by Eric Pascarello:
Trust me, you just have to link the js files and add two lines of code and bam it will be working for you and your boss will think you are a genious.
Eric


Ahh, now we know how Eric claimed his fame.


GenRocket - Experts at Building Test Data
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Hey I broke down and told them how to do it at my company. My boss has everything fading in and out on the site now. AHHHHH

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

LOL! That's the problem when someone discovers something like the Scriptaculous effects -- they start using it for everything whether it's appropriate or not!


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

If only I could make myself fade out whenever I wanted. Now that would be cool. Eric, I need a script...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I perfer

new Gregg.GetALife("real soon");

heheheheh

Now back to drag and Drop....
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

Originally posted by Eric Pascarello:
I perfer

new Gregg.GetALife("real soon");

heheheheh

Now back to drag and Drop....


I'll Drag you out to the alley and Drop kick you. Have we hijacked this thread enough yet?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
So did you implement the drag and drop with the sortable lists?

http://wiki.script.aculo.us/scriptaculous/show/SortableListsDemo

If you use that your boss will be impressed. I am telling you right now. They will be shocked that you could pull this off.

eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Drag Images from One Table Column to Other