troubleshooting Question

Missing $_POST element.

Avatar of springthorpeSoftware
springthorpeSoftwareFlag for United States of America asked on
JavaScriptPHP
9 Comments1 Solution87 ViewsLast Modified:
When form is re-submitted via JavaScript on another page, one (and maybe more, I haven't looked) of the $_POST values is missing.  Many others do exist.

A text box with the same name/id as the requested $_POST element exists on the submitted form (I've verified the name/id.) and that text box contains text, but PHP is throwing an "Undefined index:" error when I do a "$v = $_POST['xx']".  I did a dump of the $_POST elements and it is not there.

If, however, I re-submit from the form itself (not from another open page), that $_POST value DOES exist.

As a note, there are over 100 fields on the re-submitted page.  Don' t know if this would affect it, or not.

Has anyone heard of this behavior and, if so, how to correct?

Thanks,
Bruce

JavaScript that submits page. It is on the active window, function is called by a button click:

function CloseIt()
{
	if (!(window.opener.document.adiApproveOrder == undefined) 
	 && !(window.opener.document.adiApproveOrder.closed)) {
		var actn = document.getElementById("action").value;
		if (actn == "approved") {
			window.opener.document.adiApproveOrder['action'].value = "deliver";
		} else if (actn == "submitted") {
			window.opener.document.adiApproveOrder['action'].value = "submitted";
		} else {
			window.opener.document.adiApproveOrder['action'].value = "";
		}
		window.opener.document.adiApproveOrder.submit();
	}
	window.close();
}
ASKER CERTIFIED SOLUTION
gr8gonzo
Consultant

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros