dcsimg
www.webdeveloper.com
Results 1 to 6 of 6

Thread: Drag and Drop list order and submit. Can it be done?

  1. #1
    Join Date
    Aug 2008
    Posts
    4

    Drag and Drop list order and submit. Can it be done?

    Hi,

    Iím currently using a script/form that has served a purpose for me for some time but I keep thinking back to a vision I had some time ago that I was never able to master.



    The closest thing I can find to what I want is shown here

    http://www.dhtmlgoodies.com/scripts/...p-quiz-d2.html

    but itís still not exactly what Iím after (im not looking for a quiz)





    Basically I am creating a team selection page for my users (there only a handful of them)



    What I would be doing is list on the right hand side of the screen, every available player in their squad (usually 45 names) and the on the left hand side of the screen, have empty boxes (18 of them) representing the positions on the field.

    There would also be a sub section below the 18 feild positions on the right for emergency players (6 of them) in case somebody got injured ect.



    My hope then would be that a user could:



    * Click a name on the left and drag it to a field position on the right, thus filling that position and removing the players name from the squad list (because he has been selected)



    * This would continue to happen until all field positions were full.



    * Once all positions were full, the user would click a submit button to send the chosen players to me in a plain text list via email



    * A user would be banned from clicking submit until all positions were filled.



    * A user could remove a player by dragging his name back out of a position (this would also re disable the submit button if the position is then not filled.



    * I've attached a photoshop view of my idea (sorry for it being out of allignment) and note that the sample might not follow the rules shown above (eg submit button visible before team it full





    Is this still something that is too ambitious???

    http://img542.imageshack.us/img542/6783/zcgh.jpg

  2. #2
    Join Date
    Oct 2013
    Location
    3rd planet from the sun
    Posts
    177
    Why not a form and next to each position the user fills in a name (using js to make sure that the name can only be used one time only). Then the user submits the form to you (using js all fileds would be required preventing the form to be sent until all positions were filled).

    I'm not sure if you could do it the way you had suggested, however if someone knows a way I would be interested in the answer.

  3. #3
    Join Date
    Aug 2008
    Posts
    4
    Gday. Thanks for your thoughts.

    Any idea how I would do it?

    The one I'm using now (totally different to my idea) is very buggy hence the want to change, but I'm no good at this stuff as it was built for me.

  4. #4
    Join Date
    Oct 2013
    Location
    3rd planet from the sun
    Posts
    177
    A javascript ninja could show the proper code, unfortunately that is not my skillset. Basically using js it would store the variable (the name inputted on line A) on for example line A. Then on line b, using js it would compare that variable to line a; if the two matched you would show a tooltip saying something like "Only one player per position is allowed please try again". Then compare line c with line b and so on and so on until all positions are filled with a player's name. Then and only then would the user be allowed to hit the submit button.

  5. #5
    Join Date
    Aug 2008
    Posts
    4
    Quote Originally Posted by kralcx View Post
    A javascript ninja could show the proper code, unfortunately that is not my skillset. Basically using js it would store the variable (the name inputted on line A) on for example line A. Then on line b, using js it would compare that variable to line a; if the two matched you would show a tooltip saying something like "Only one player per position is allowed please try again". Then compare line c with line b and so on and so on until all positions are filled with a player's name. Then and only then would the user be allowed to hit the submit button.
    Umm ok, sorry for my ignorance, but where can I find one of these ninjas, or even the guy that made the original?

  6. #6
    Join Date
    Oct 2013
    Location
    3rd planet from the sun
    Posts
    177
    Quote Originally Posted by zugfrig78 View Post
    Umm ok, sorry for my ignorance, but where can I find one of these ninjas, or even the guy that made the original?
    I don't know how you would find the original coder, however summarize what was said here in the javascript section and hopefully someone should be able to point you in the right direction

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles