473,397 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

drag and image and browse image when click on image and display it

i have developed a drag and clone of image.now in that i want that when click on image it display browse dialog box for browse image from computer.and after selecting image it display on that particular image tag.i am using jquery drag and drop plugin in php.below is my drag and drop code.

javascript:

Expand|Select|Wrap|Line Numbers
  1. <script>
  2.  
  3. $(function() {
  4. $( "#accordion" ).accordion();
  5. });
  6.  
  7.     $(".draggable").draggable({
  8.         helper: 'clone'
  9.     });
  10.     $(".drop-zone").droppable({
  11.         accept: '.draggable',
  12.         drop: function(event, ui) {
  13.             var $clone = ui.helper.clone();
  14.             if (!$clone.is('.inside-drop-zone')) {
  15.                 $(this).append($clone.addClass('inside-drop-zone').draggable({
  16.                     containment: '.drop-zone'
  17.                 }));
  18.  
  19.                 $clone.resizable({ //this works but I dont want it to on outside elements
  20.                     helper: "ui-resizable-helper"
  21.                 });
  22.  
  23.             }
  24.         }
  25. });
  26.  
  27. </script>

html code:

Expand|Select|Wrap|Line Numbers
  1. <img class="draggable" alt="image"/> <div class="drop-zone"> </div>
Oct 2 '13 #1
0 1381

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Phil Powell | last post by:
How do you detect an image MIME type if you know of the image in a directory? For example, I know of: if (is_file("$myImagePath/$myImageName")) { // FIND MIME TYPE BUT HOW I DUNNO } The...
1
by: Dev | last post by:
Dear Friends, I am passing the image name, size (in bytes) and imgaeformat (like jpg or bmp or pdf) through the network. I want display the image into picturebox without saving image...
0
by: Rajeev Kumar | last post by:
Hi Friends This is problem of showing more than one image in a row of image list. This is very much possible using MFC/SDK. Is there any way to do it in C# also? So, far I have tried this with the...
2
by: lukegregory | last post by:
Hope this should be a simple one, upon clicking a button I would like a black image box to display a locally stored bitmap image. Assuming it requires something like: ImageBox.Image =...
7
by: fredo | last post by:
I've studied Eric Meyer's pure css popups, version two: http://meyerweb.com/eric/css/edge/popups/demo2.html which pops up an image when I roll over a text link. Now I want to pop up a large...
6
by: fredo | last post by:
A few days ago, Jim answered (THANK YOU, Jim) my question about how to make an image pop up when an image link is hovered. That discussion is here: ...
2
by: bizt | last post by:
Hi, Is it possible to obtain the width/ height of an image when that image is dyanically created using a PHP script and passing GET attributes. For example: <img...
0
by: u01jmg3 | last post by:
Hi, basically I create a png image on the fly and that all works fine but when I go to save the image it's taking the name of the .php script used to create it as its default name. e.g. I visit...
7
by: hsegoy1979 | last post by:
Dear All Iam using file upload control and i want to display image in another pop up page .But image is not displaying in image control iam sending image path thru querystring . here is my code ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.