I am currently working on a browsergame called "WordShuffle".
(words are german at the moment for test purpose, if you want to play)
My progress is going on pretty well, but I decieded to change the way how you play the game. At the moment you have to quess the word by typing your guess into a textfield.
So my idea is now that people are able to rearrange the letters in a word by draging and dropping it in the right order instead of typing it into a textfield.
Since I am not good at javascript (and I think this should work best with javascript) I need help by that.
However, I must be able to get a value out of it to be able to compare it to the correct word.
A submit button should pass the value.
You could use jQuerys Sortable (https://jqueryui.com/sortable/).
With that you could create a sortable word where each letter is actually in a separate div. For example like so:
HTML:
JS:
http://jsfiddle.net/dbp2988e/
Then all you would need to do is iterate over the div's inside the word div and grab each div's innerHTML (or via jQuery .html()). Then make a single string of it and validate that against the secret word.
Here is a working example using jquery-ui sortable e and Fisher-Yates shuffle algorithm :