Displaying data after submit

catonthecouchproductions
catonthecouchproductions used Ask the Experts™
on
Hey,

I am using the code below in the box and want to display the data sent from the form in a DIV after the form has been submitted. What is the best way to do so?

Ryan
$("#survey").validate({
		submitHandler: function(form) {
			var options = { 
				success: function(){
					$("#survey").hide();
					$(".success").fadeIn();
				}				
			}; 
			$(form).ajaxSubmit(options);
		},
		rules: {
			date: "required",
			time: "required",
			new_burger: "required",
			rate_burger:  "required",
			burger_comments:  "required"
		}
	});

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Greg AlexanderLead Developer

Commented:
What does this do?
<script type="application/javascript">
$("#survey").validate({
		submitHandler: function(form) {
			var options = { 
				success: function(){
					$("#survey").hide();
					$(".success").fadeIn();
				}				
			}; 
			$(form).ajaxSubmit(function(data){
				alert(data);
			});
		},
		rules: {
			date: "required",
			time: "required",
			new_burger: "required",
			rate_burger:  "required",
			burger_comments:  "required"
		}
	});
</script>

Open in new window

Greg AlexanderLead Developer

Commented:
Sorry, I mean does the above code alert the data?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial