Jump to content

Search the Community

Showing results for tags 'drag and drop'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Found 4 results

  1. Hi, I have a script that works properly, shows an image and you can drag and drop that image. But my problem is: how I can add more images? I thought copying the code would appear another image, but it is not. Thank you. <script src="http://d3lp1msu2r81bx.cloudfront.net/kjs/js/lib/kinetic-v5.0.2.min.js"></script><script defer="defer">function drawImage(imageObj) { var stage = new Kinetic.Stage({container: "container",width: 800,height: 600});var layer = new Kinetic.Layer();// darth vadervar darthVaderImg = new Kinetic.Image({image: imageObj,x: 100,y: 30,width: 40,height:
  2. I tried one of w3schools tried-and-true "tryit"s in the up-to-date version of Chrome and it didn't work. Here it is: http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_draganddrop But it works in Firefox and Safari. This close-cousin demo http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_draganddrop2 also fails in Chrome but not in FF or Safari. But when I tried this similar drag and drop demo in Chrome: http://html5demos.com/drag it worked and it also works in FF and Safari. Any ideas why the two W3 demos don't work in Chrome? Maybe my Chrome preferences are slightly wron
  3. There are 2 images, and 2 locations, lets named it img1, img2, loc1, and loc2. What im trying to do is drag and drop img1 to loc1, which mean i don't want img1 to be drop in loc2, i want the specific image drop on specific location. function dropIn(evt){var root = document.getElementsByTagName("body")[0];evt.preventDefault();var id = evt.dataTransfer.getData("text");if(ev.target.getAttribute('data-drop') == id)ev.target.appendChild(document.getElementById(id));}<div id="box1" style="position: absolute; top: 220px; left: 220px;" ondragover="dragIn();" ondrop="dropIn();" ><img id="img1
  4. I know that HTML5 provides Drag and Drop and is a powerful tool for it. However I just used it successfully for dragging and dropping HTML elements, HTML codes and Files. What other thing can I do with this feature? For example can I drag an address from the address bar and drop it on a text box? or can I do it reversely?
  • Create New...