currently I work on some project.
The project is simple, the user vists page, sees the dorp down list and sortable list of some plans.

Then the user chooses one of the items form the drop down list and also using sortable list ordeds the items accoridng to his/her priority.

Finally the user submits his/her chosen value from th drop down list and ordered priorities using simple text box, which is sent to predefined mail.

I made two select drop down list using javascript and simple sortable list, but as far as I am new to JS and I could not identify how to tell the code to get the chosen value from the dop down list and ordered priority by the user and submit them autoamtically with comment written in the text box by the user.

I know the for mailing purposes PHP must be used, but first I have to find out how to get the last content chose by the user?

Please help on this issue, any help will be appreciated.



		.connected, .sortable, .exclude, .handles {
			width: 100%;

		   /*-webkit-touch-callout: none;
			-webkit-user-select: none;
			-khtml-user-select: none;
			-moz-user-select: none;
			-ms-user-select: none;
			user-select: none  */
		.sortable.grid {
			overflow: hidden;
		.connected li, .sortable li, .exclude li, .handles li {
			list-style: none;
			border: 1px solid #CCC;
			background: #F6F6F6;
			font-family: "Tahoma";
			color: #1C94C4;
			margin: 5px;
			padding: 5px;
			height: 45px;
		.handles span {
			cursor: move;
		li.disabled {
			opacity: 0.5;
		.sortable.grid li {
			line-height: 80px;
			float: left;
			width: 80px;
			height: 80px;
			text-align: center;
		li.highlight {
			background: #FEE25F;
		#connected {
			width: 440px;
			overflow: hidden;
			margin: auto;
		.connected {
			float: left;
			width: 200px;
		.connected.no2 {
			float: right;
		li.sortable-placeholder {
			border: 1px dashed #CCC;
			background: none;

(function($) {
var dragging, placeholders = $();
$.fn.sortable = function(options) {
	var method = String(options);
	options = $.extend({
		connectWith: false
	}, options);
	return this.each(function() {
		if (/^enable|disable|destroy$/.test(method)) {
			var items = $(this).children($(this).data('items')).attr('draggable', method == 'enable');
			if (method == 'destroy') {
				items.add(this).removeData('connectWith items')
					.off('dragstart.h5s dragend.h5s selectstart.h5s dragover.h5s dragenter.h5s drop.h5s');
		var isHandle, index, items = $(this).children(options.items);
		var placeholder = $('<' + (/^ul|ol$/i.test(this.tagName) ? 'li' : 'div') + ' class="sortable-placeholder">');
		items.find(options.handle).mousedown(function() {
			isHandle = true;
		}).mouseup(function() {
			isHandle = false;
		$(this).data('items', options.items)
		placeholders = placeholders.add(placeholder);
		if (options.connectWith) {
			$(options.connectWith).add(this).data('connectWith', options.connectWith);
		items.attr('draggable', 'true').on('dragstart.h5s', function(e) {
			if (options.handle && !isHandle) {
				return false;
			isHandle = false;
			var dt = e.originalEvent.dataTransfer;
			dt.effectAllowed = 'move';
			dt.setData('Text', 'dummy');
			index = (dragging = $(this)).addClass('sortable-dragging').index();
		}).on('dragend.h5s', function() {
			if (index != dragging.index()) {
				items.parent().trigger('sortupdate', {item: dragging});
			dragging = null;
		}).not('a[href], img').on('selectstart.h5s', function() {
			this.dragDrop && this.dragDrop();
			return false;
		}).end().add([this, placeholder]).on('dragover.h5s dragenter.h5s drop.h5s', function(e) {
			if (!items.is(dragging) && options.connectWith !== $(dragging).parent().data('connectWith')) {
				return true;
			if (e.type == 'drop') {
				return false;
			e.originalEvent.dataTransfer.dropEffect = 'move';
			if (items.is(this)) {
				if (options.forcePlaceholderSize) {
				$(this)[placeholder.index() < $(this).index() ? 'after' : 'before'](placeholder);
			} else if (!placeholders.is(this) && !$(this).children(options.items).length) {
			return false;



<ul class="sortable">
            <li> Item 1
            <li> Item 2
            <li> Item 3
            <li>Item 4
            <li> Item 5
            <li>Item 6
            <li> Item 7
            <li> Item 8
            <li> Item 9
            <li>Item 10

Thank you.