I have a website that redirects a user to a external host for payment processing. When the user is returned to my website depending on the results of the payment processing I need to redirect the user to a final webpage with POST method so their order can be completed. I call the javascript code below to execute the POST and it works on Chrome and Opera browsers. Howver on Firefox and IE browsers it fails and the user ends up with a blank page. The error on the page is given as follows
The Javascript looks as follows
I have found several articles that note that adding code below to the html document error should fix the problem but this has not worked for me.
Any ideas why this error would occur on Firefox and any suggestions on how I could fix it.
The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.
The Javascript looks as follows
Code:
var cSecurem = 'https://www.website.com/';
function gotofinalpage(p1,p2) {
setLoginCookie('secure');
var cURL = cSecurem + 'bh/finalpage.r?';
var myForm = document.createElement("form");
myForm.method="post" ;
myForm.action = cURL ;
var param1 = document.createElement("input");
param1.type = "text";
param1.name = "p1";
param1.value = p1;
myForm.appendChild(param1);
var param2 = document.createElement("input");
param2.type = "text";
param2.name = "p2";
param2.value = p2;
myForm.appendChild(param2);
myForm.submit() ;
}
I have found several articles that note that adding code below to the html document error should fix the problem but this has not worked for me.
Code:
<meta content="utf-8" http-equiv="encoding"/>
Any ideas why this error would occur on Firefox and any suggestions on how I could fix it.