JQuery drag and drop image order with save to database?

We have a property image gallery on our website and a CMS that allows us to add/edit images in the gallery.
Image file names are stored in a database table:
imgID (int)
propertyID (int)
imgfilename (nvarchar)
displayorder (int)
Images are displayed in order of "displayorder" but we'd like to be able to drag and drop the order in our CMS and have this update the database table with the correct display order.
We found this jQuery solution but it doesn't appear to work, although descriptively it's exactly what we're trying to acheive:
http://halnesbitt.com/blog/2010/08/05/save-order-with-jquery-ui-sortable-and-aspaccess
Can anyone advise a similar script or solution?  We're using Classic ASP and MSSQL.
Thank you.
NJ

Hi,
Not looking at any code you have an upload button for the video and an insert for the form. So both forms are independent of each other it looks like, thats why when you do one you only get that info and when you do the other you only get the other info. You should just make one form with the uploader included. Make one form with all the fields included (movie name, movie page, movie description, movie file) after the form is completed then select the file field and go to...
Server Behaivoirs, Developer Toolbox, File upload, upload file. Follow the widgets.

Similar Messages

  • Why can't I drag and drop images from the browser into other programs?

    Ever since I upgraded to Firefox 4 (even after I upgraded again to Firefox 5) I have been unable to drag images from the browser into other programs, including MS Paint and IcoFx. I receive an error message stating that the file (the address given lists it as being located in the temporary files folder) cannot be found.
    Prior to this I had always been able to conveniently drag and drop images for easy editing without having to save first and then open them. This feature is important to me, as I work with graphics very often, and is still available in Chrome and Internet Explorer. I love Firefox though, and hope that there is something I can do to fix the problem.

    I had this problem on Windows 8.1.1 and iTunes 11.2.2.3
    To resolve it from within Itunes I did :  Edit, Preferences, Sharing.
    I took the tick out of "Share my library on my local network"
    Click OK.
    Closed iTunes/
    Reopened iTunes and I can drag and drop.
    I went back into Edit, Preferences, Sharing and put the tick back and clicked OK.
    Works fine now.

  • I am unable to drag and drop image files in a JAVA supposrted site. I have all the lastest versions of softwarte here - everything is up to date.

    I am no longer able to drag and drop image files int this JAVA supported site. It had always worked flawlessly in the past.
    I would open the site, go to Send Files, allow access, fill out the fields and then drag and drop my image files. Now I can only use the ADD (+) button to do so.
    I have the latest versions of OS-X Lion and JAVA installed on my computer
    http://www.clippingprovider.com/CP_II_EU/Welcome.html

    This is the Tech Sheet on the subject:
    Photoshop Help | Managing paths
    It contains this item under Manage Paths:
    When you use a pen or shape tool to create a work path, the new path appears as the work path in the Paths panel. The work path is temporary; you must save it to avoid losing its contents.
    Ok, the red you referred to is a Stoke you added. Then QuickMask is not involved.

  • How to change this code to drag and drop image/icon into it??

    Dear Friends:
    I have following code is for drag/drop label, But I need to change to drag and drop image/icon into it.
    [1]. code 1:
    package swing.dnd;
    import java.awt.*;
    import javax.swing.*;
    public class TestDragComponent extends JFrame {
         public TestDragComponent() {
              super("Test");
              Container c = getContentPane();
              c.setLayout(new GridLayout(1,2));
              c.add(new MoveableComponentsContainer());
              c.add(new MoveableComponentsContainer());
              pack();
              setVisible(true);
         public static void main(String[] args) {
              try {
                   UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
              catch (Exception ex) {
                   System.out.println(ex);
              new TestDragComponent();
    }[2]. Code 2:
    package swing.dnd;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    import java.awt.dnd.*;
    import java.awt.datatransfer.*;
    import java.awt.image.*;
    import java.awt.dnd.DragSource;
    import java.awt.dnd.DropTarget;
    public class MoveableComponentsContainer extends JPanel {     
         public DragSource dragSource;
         public DropTarget dropTarget;
         private static BufferedImage buffImage = null; //buff image
         private static Point cursorPoint = new Point();
         public MoveableComponentsContainer() {
              setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED, Color.white, Color.gray));
              setLayout(null);
              dragSource = new DragSource();
              ComponentDragSourceListener tdsl = new ComponentDragSourceListener();
              dragSource.createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY_OR_MOVE, new ComponentDragGestureListener(tdsl));
              ComponentDropTargetListener tdtl = new ComponentDropTargetListener();
              dropTarget = new DropTarget(this, DnDConstants.ACTION_MOVE, tdtl);
              setPreferredSize(new Dimension(400,400));
              addMoveableComponents();
         private void addMoveableComponents() {
              MoveableLabel lab = new MoveableLabel("label 1");
              add(lab);
              lab.setLocation(10,10);
              lab = new MoveableLabel("label 2");
              add(lab);
              lab.setLocation(40,40);
              lab = new MoveableLabel("label 3");
              add(lab);
              lab.setLocation(70,70);
              lab = new MoveableLabel("label 4");
              add(lab);
              lab.setLocation(100,100);
         final class ComponentDragSourceListener implements DragSourceListener {
              public void dragDropEnd(DragSourceDropEvent dsde) {
              public void dragEnter(DragSourceDragEvent dsde)  {
                   int action = dsde.getDropAction();
                   if (action == DnDConstants.ACTION_MOVE) {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveDrop);
                   else {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveNoDrop);
              public void dragOver(DragSourceDragEvent dsde) {
                   int action = dsde.getDropAction();
                   if (action == DnDConstants.ACTION_MOVE) {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveDrop);
                   else {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveNoDrop);
              public void dropActionChanged(DragSourceDragEvent dsde)  {
                   int action = dsde.getDropAction();
                   if (action == DnDConstants.ACTION_MOVE) {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveDrop);
                   else {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveNoDrop);
              public void dragExit(DragSourceEvent dse) {
                 dse.getDragSourceContext().setCursor(DragSource.DefaultMoveNoDrop);
         final class ComponentDragGestureListener implements DragGestureListener {
              ComponentDragSourceListener tdsl;
              public ComponentDragGestureListener(ComponentDragSourceListener tdsl) {
                   this.tdsl = tdsl;
              public void dragGestureRecognized(DragGestureEvent dge) {
                   Component comp = getComponentAt(dge.getDragOrigin());
                   if (comp != null && comp != MoveableComponentsContainer.this) {
                        cursorPoint.setLocation(SwingUtilities.convertPoint(MoveableComponentsContainer.this, dge.getDragOrigin(), comp));
                        buffImage = new BufferedImage(comp.getWidth(), comp.getHeight(), java.awt.image.BufferedImage.TYPE_INT_ARGB_PRE);//buffered image reference passing the label's ht and width
                        Graphics2D graphics = buffImage.createGraphics();//creating the graphics for buffered image
                        graphics.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f));     //Sets the Composite for the Graphics2D context
                        boolean opacity = ((JComponent)comp).isOpaque();
                        if (opacity) {
                             ((JComponent)comp).setOpaque(false);                         
                        comp.paint(graphics); //painting the graphics to label
                        if (opacity) {
                             ((JComponent)comp).setOpaque(true);                         
                        graphics.dispose();
                        remove(comp);
                        dragSource.startDrag(dge, DragSource.DefaultMoveDrop , buffImage, cursorPoint, new TransferableComponent(comp), tdsl);     
                        revalidate();
                        repaint();
         final class ComponentDropTargetListener implements DropTargetListener {
              private Rectangle rect2D = new Rectangle();
              Insets insets;
              public void dragEnter(DropTargetDragEvent dtde) {
                   Point pt = dtde.getLocation();
                   paintImmediately(rect2D.getBounds());
                   rect2D.setRect((int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),buffImage.getWidth(),buffImage.getHeight());
                   ((Graphics2D) getGraphics()).drawImage(buffImage,(int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),MoveableComponentsContainer.this);
                   dtde.acceptDrag(dtde.getDropAction());
              public void dragExit(DropTargetEvent dte) {
                   paintImmediately(rect2D.getBounds());
              public void dragOver(DropTargetDragEvent dtde) {
                   Point pt = dtde.getLocation();
                   paintImmediately(rect2D.getBounds());
                   rect2D.setRect((int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),buffImage.getWidth(),buffImage.getHeight());
                   ((Graphics2D) getGraphics()).drawImage(buffImage,(int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),MoveableComponentsContainer.this);
                   dtde.acceptDrag(dtde.getDropAction());
              public void dropActionChanged(DropTargetDragEvent dtde) {
                   Point pt = dtde.getLocation();
                   paintImmediately(rect2D.getBounds());
                   rect2D.setRect((int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),buffImage.getWidth(),buffImage.getHeight());
                   ((Graphics2D) getGraphics()).drawImage(buffImage,(int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),MoveableComponentsContainer.this);
                   dtde.acceptDrag(dtde.getDropAction());
              public void drop(DropTargetDropEvent dtde) {
                   try {
                        paintImmediately(rect2D.getBounds());
                        int action = dtde.getDropAction();
                        Transferable transferable = dtde.getTransferable();
                        if (transferable.isDataFlavorSupported(TransferableComponent.COMPONENT_FLAVOR)) {
                             Component comp = (Component) transferable.getTransferData(TransferableComponent.COMPONENT_FLAVOR);
                             Point location = dtde.getLocation();
                             if (comp == null) {
                                  dtde.rejectDrop();
                                  dtde.dropComplete(false);
                                  revalidate();
                                  repaint();
                                  return;                              
                             else {                         
                                  add(comp, 0);
                                  comp.setLocation((int)(location.getX()-cursorPoint.getX()),(int)(location.getY()-cursorPoint.getY()));
                                  dtde.dropComplete(true);
                                  revalidate();
                                  repaint();
                                  return;
                        else {
                             dtde.rejectDrop();
                             dtde.dropComplete(false);
                             return;               
                   catch (Exception e) {     
                        System.out.println(e);
                        dtde.rejectDrop();
                        dtde.dropComplete(false);
    }Thanks so much for any help.
    Reagrds
    sunny

    Well, I don't really understand the DnD interface so maybe my chess board example will be easier to understand and modify:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=518707
    Basically what you would need to do is:
    a) on a mousePressed you would need to create a new JLabel with the icon from the clicked label and add the label to the glass pane
    b) mouseDragged code would be the same you just repaint the label as it is moved
    c) on a mouseReleased, you would need to check that the label is now positioned over your "drop panel" and then add the label to the panel using the panels coordinates not the glass pane coordinates.

  • Drag and drop images from the OS or select images over filebrowser

    Hello,
    I want to create an image upload tool in JavaFX with similar functionality like Jumploader (http://jumploader.com/). The users should be able to select images from the filesystem that will be resized and uploaded to their website, similar as in Facebook. The difference is that I want users to be able to crop images directly in my application. This is something, other upload tools do not offer.
    I was searching weeks on the web trying to find a sample on how to drag and drop images in to a JavaFX 1.3.1 app or also to create a file browser. I have found many examples but they seem to be outdated. Is it to early yet to try and start projects like these with JavaFX as JavaFX is still under development? Or can anybody lead me in to the right direction?
    Thanks,
    Chris

    To be more precise, you can setup a JComponent or JPanel on top of your JavaFX nodes that has a TransferHandler that can convert the (AWT/Swing) images dragged to the app to JavaFX image and then insert it into the underlying node.
    As for the file chooser itselft: ListView and the JavaFX composer can allow you to create one quite easily. TreeView can aslso be used to a lesser extend (still a big buggy). For both of these, there are small bugs in the Cell API that may (or may not) prevent from displaying a proper thumbnail in the cells.
    You can also use a regular JFileChooser if you do not mind the dialog box having a different LnF from the rest of your application.

  • Can`t drag and drop images into PSE5

    hi,
    i`m from germany, so sorry for my english..
    i use pse5 since a few years and a few month with windows7..today i had to reinstall it and now i can`t drag and drop images from explorer or acdsee to PSE workspace. i get no error-message , only this circle with a diagonal line..
    i CAN drag and drop images from the editor..
    - i reinstalled it and repaired it
    - tried diffferent compatability modes
    - i don`t run the program as a administrator ( tried it- it was the same)
    so can anyone please help me?
    thank you so much!
    mareen

    Try making a direct shortcut to the Organizer and then the Editor.
    You should then be able to drag and drop on to the desktop icon.
    On Windows right click on the desktop and select New >> Shortcut
    Browse to Computer OS C:
    And find the PSE Organizer application in Program Files or Program Files (x86) on Windows 7 - 64 bit.
    Inside the Adobe >> Photoshop Elements Organizer (yellow folder) you are looking for an application file “PhotoshopEementsOrganizer” with six small icons (e.g. representing thumbnails - could be different in PSE5 but look for the exe file)
    Select it and click OK
    Click next
    Rename by taking out Photoshop Elements leaving just the word Organizer
    Then click finish
    You should now be able to launch directly form the desktop by double clicking on the icon.
    You can set up a similar direct link to the Editor application.
     

  • JQuery Drag and Drop Plugin Not Working on Safari 7.0

    I have a website that uses jQuery Drag and Drop and it is working on Safari 6.0.5, Chrome, and Firefox, but it doesn't work on Safari 7. Any ideas why this would be?
    In genearl Safari has a lot of CSS and Javascript issues. If there is a place that list all of these issues and solutions I would really appreciate it.
    Thanks

    More information would be great.
    What type of site is it?  WordPress?  Joomla or Drupal?
    What drag and drop theme or framwork are you using?
    What version of software and theme, what type of hosting, what version of PHP and mySQL?
    I'm having similar issues but details such as these will go a long way to grouping symptoms and getting to the bottom of the problem(s).
    One thing I've noted is that in most cases everything is actually working.  It's just taking an unbelievably long time.  jQuery isn't the problem either.  It seems more closely related to the quantity of available tasks on a given page.
    There are forum posts for v7 that say Safari isn't compatible with WordPress for example.  It is compatible and works just fine, but if you're running the latest version of Catalist Theme and their Dynamic Site Builder you can't do anything with Dynamic admin because all its options are on a single page which appears to be too much for Safari 7 to handle for some reason.  Folks are having similar problems with Genesis, Headway Theme, Pagelines and many others.

  • Drag and drop images using tilelist in flex

    i just want the working code for drag and drop images using
    tilelist in flex

    Try JDK 1.4 and call setDragEnabled(true)
    I will also post updated version of MediaChest soon using custom TransferHandler for DnD different types of Objects.

  • Drag and Drop image to desktop == Zero Byte File

    Drag and Drop image to desktop == Zero Byte File
    == This happened ==
    Every time Firefox opened
    == FireFox 3.6 OR Windows 7 64

    i have the same problem and Sun doesn't seem to have an answer to this question. The DnD works in Mac OS, but not on Window 2000/XP.

  • How come I cant drag and drop images onto my imove

    I can't drag and drop images from my desktop or folder into imovie.

    Simply because you are not posting to the iMovie forum. Post there and find out.

  • How come in Pages, i cannot drag and drop images?

    how come in Pages, i cannot drag and drop images?

    Yes you can in all versions.
    It helps if you actually describe what you are doing.
    Where are you dragging it from and where are you dragging it to?
    In what version of Pages?
    I suspect you are trying to drag an image into a Table, Header or Footer in Pages 5, which is no longer possible. Feature removed by Apple.
    Peter

  • Jquery Drag and drop in cfdiv bind url

    Hi guys,
                is it possible to use jquery drag and drop in templete that I bind in cfdiv tag? If you could let me know how can we do it.

    Hi there
    jquery and coldfusion are not related.  Cold Fusion runs on the server and produces html, jquery runs on the client and operates on html.  The two are totally disconnected.
    Take a look at the html produced by the cfdiv tag, and then head over to the jquery forums.  Im sure someone will be able to help you more there.
    Cheers

  • My pages has stopped letting me drag and drop images

    my pages has stopped letting me drag and drop images, into the template

    Just the one template or all templates?
    Can you drag and drop an image anywhere on the page?
    When you have a problem try and isolate it.
    Not all images are placeholders.
    Also if you get oddball things happening sometimes a simple restart of your computer will fix them.
    Peter

  • How Do I Drag and Drop Images From Windows Explorer to Applet?

    I'm not able to Drag and Drop Images and other files (like audio and video files) from Windows Explorer to Applet. Is that Possible to do so?. Can SomeOne help me out regarding this? Thanx in Advance.

    No problem here. Can you say any more about the situation?
    Jerry

  • Multiple Image upload with save to database

    Hi everyone,
    I wonder whether anyone can help me, I have been trying to use the multiple image upload with save to database wizard. When I create the page and upload it and then view it in Safari the only thing that is on the page is an upload button. When I press the upload button I am able to browse my files and select them. When this window closes a flash loading value is shown but no images have been uploaded.
    Am I missing anything? I have had no problems uploading single files and creating albums. I want to create an online gallery so that I can do a multiple upload to a specific album if this is possible.
    Cheers
    Sarah

    Hi Sarah,
    >>
    but only the filename appeared in the database and no other information was stored.
    >>
    that´s how it´s been designed also in the "single upload" -- the path_to_the_folder where the files sit in have to be determined elsewhere
    >>
    {wedimg_idalb}
    >>
    I don´t see any reference to this "dynamic data" placeholder in any of your table columns you posted -- where does this one come from ?
    >>
    1. I have multiple clients and each client has their own set of images.
    2. Each set of client images must be linked to an album via the album ID
    >>
    do you have any "foreign key" which is related to the user_table´s ID in order to make user ID 2 upload his images in album ID 2 ? How will the upload page "know" where the images are going to be uploaded to ?
    >>
    and the album page, wedding_alb
    >>
    to my mind *this* table would itself need a foreign key to the user_table in order to "map" record 2 to user ID 2 -- or do I miss something ?
    Günter Schenk
    Adobe Community Expert, Dreamweaver

Maybe you are looking for

  • Dynamic list of values in CR 2008 - request of login to database

    I am using CR2008 with VB2005. I created simple application which generate report on different SQL Server 2005 databases. Report uses OLE.DB connection to SQL Server, I pass logon information in VB using "SA" username and password. The same simple re

  • Trouble Setting "Display PDF in browser using" by MCX

    I want to force the PDF viewer in Safari to Mac OS X v10.6 built-in Preview Application instead of Adobe Acrobat Pro (9.4.0). I found that unchecking "Display PDF in browser using:" in Acrobat's Preferences, sets the viewer in Safari to Preview. It s

  • CIN - Difference in Balance  shown by J2I9 and J2IUN

    We are to utilize duties by j2iun for month of April 2010. But the balance shown are much less than the balances shown in J2I9. J2I9 balances tally with the GL banalces. Kinldy help me resolve this issue. thanks Gurjit

  • Finder - setting Directories

    Hi, A query from a newbie who is transferring QuatroPro spreadsheets from a PC to Mac & wishes to place them in a specially created set of directories. Using the mkdir command I created under my Home Directory another in the second column then anothe

  • SAXReader / memory leak.

    I have a huge and continuous memory increase when I do the following. private Socket socket = SocketFactory.getDefault().createSocket(); socket.setTcpNoDelay(true); socket.setKeepAlive(true); socket.bind(new InetSocketAddress(local, 0)); socket.conne