• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 273
  • Last Modified:

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

0
rgb192
Asked:
rgb192
  • 3
  • 3
1 Solution
 
Michel PlungjanIT ExpertCommented:
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?
0
 
rgb192Author Commented:
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
0
 
Michel PlungjanIT ExpertCommented:
First thing to check is the action of the form. If the url is wrong or post is not allowed or the parms are wrong then you will get an error
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
rgb192Author Commented:
what are the parms
0
 
Michel PlungjanIT ExpertCommented:
all the inputs and their values
0
 
rgb192Author Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now