• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Drag Images from One Table Column to Other

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look into drag and drop with http://script.aculo.us/

Eric
 
nirav soni parmar
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank You.. For Reply.

But I am not using AJAX. So I want Simple Code for Drag & Drop Images.
 
author
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I dont want to use AJAX for that...

On that link they used AJAX for that..
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 67756
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If only I could make myself fade out whenever I wanted. Now that would be cool. Eric, I need a script...
 
Bear Bibeault
Sheriff
Posts: 67756
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I perfer

new Gregg.GetALife("real soon");

heheheheh

Now back to drag and Drop....
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic