Link to home
Start Free TrialLog in
Avatar of rgb192
rgb192Flag for United States of America

asked on

failed to update order

I moved the code to a newer version of php
and data is gettting added
but I keep on getting dialog box
'failed to update order'

is there a point of having this dialog box
<script>
			$("form#searchorderf").submit(function(){
			 	var inputs = [];
				$(\':input\', this).each(function() {
					inputs.push(this.name + \'=\' + escape(this.value));
				})
				// now if I join our inputs using \'&\' we\'ll have a query string
				jQuery.ajax({
					data: inputs.join(\'&\'),
					url: this.action,
					type: "POST",
					dataType: "html",
					timeout: 2000,
					error: function() {
					alert("Failed to update order");
					},
					success: function(r) {
						$("#ordersearcharea").empty();
						$("#ordersearcharea").append(r);
					}
				})
				return false;
			});
			</script>

Open in new window

Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

why do you have \'

Move the script outside the <?PHP and just have the unescaped script

Does the form submission without the jQuery result in a valid page?
Avatar of rgb192

ASKER

i dont know how to do the jquery without form submission


if i change 'timeout' will i not get error


what are conditions where error (alert) occur
ASKER CERTIFIED SOLUTION
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rgb192

ASKER

what are the parms
all the inputs and their values
Avatar of rgb192

ASKER

thanks