Subversion Repositories SmartDukaan

Rev

Rev 22618 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 22618 Rev 22620
Line 745... Line 745...
745
 
745
 
746
function submitFormAsJson(jQueryForm) {
746
function submitFormAsJson(jQueryForm) {
747
	jQuery.blockUI({
747
	jQuery.blockUI({
748
		message : "<h5>Please wait while we upload data to our server</h5>"
748
		message : "<h5>Please wait while we upload data to our server</h5>"
749
	});
749
	});
750
	data = objectifyForm($("form").serializeArray());
750
	formData = objectifyForm($("form").serializeArray());
751
	for ( var name in data) {
751
	for ( var name in formData) {
752
		if (docsArray.indexOf(name) >= 0) {
752
		if (docsArray.indexOf(name) >= 0) {
753
			data[name] = +data[name];
753
			formData[name] = +formData[name];
754
		}
754
		}
755
	}
755
	}
756
	jQuery.ajax({
756
	jQuery.ajax({
757
		url : contextPath + "/register",
757
		url : contextPath + "/register",
758
		type : 'POST',
758
		type : 'POST',
759
		contentType : 'application/json',
759
		contentType : 'application/json',
760
		data : JSON.stringify(),
760
		data : JSON.stringify(formData),
761
		success : function(data) {
761
		success : function(data) {
762
			// $('#form')[0].reset();
762
			// $('#form')[0].reset();
763
			jQuery.unblockUI();
763
			jQuery.unblockUI();
764
			jQuery("html").html(data);
764
			jQuery("html").html(data);
765
		},
765
		},