I have a HTML5/js web page that was working fine and stopped working a short time ago. I have placed this web page temporally at:
https://www.barnwellmd.com/temp/test.html so I can delete it after I close this question (it saves files on my server and sends me an email).
The problem is when a user clicks on "Send to Dr. Office" a popup shows "<head><title>Not Acceptable!</title></head>
<body><h1>
Not Acceptable!</h1><p>An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.</p></body></
html>" and nothing is sent.
That button calls the sendCanvas() function:
function sendCanvas()
{
if (checkFields()) return;
clearGray();
createPrint();
var testCanvas = document.getElementById("i
mageView")
;
var canvasData = testCanvas.toDataURL("imag
e/png");
//alert(canvasData);
var ajax = new XMLHttpRequest();
//alert ('
https://www.barnwellmd.com/Uploadroutines/uploadbase64.php?name=' + document.form.ptname.value
.replace(/
/g,"_"));
ajax.open("POST",'
https://www.barnwellmd.com/Uploadroutines/uploadbase64.php?name=' + document.form.ptname.value
.replace(/
/g,"_"),false);
//ajax.open("POST",'
https://www.barnwellmd.com/Uploadroutines/uploadbase64.php',true);
ajax.setRequestHeader('Con
tent-Type'
, 'canvas/upload');
//ajax.setRequestHeader('C
ontent-Typ
e', 'application/upload');
ajax.onreadystatechange=fu
nction()
{
if (ajax.readyState == 4)
{
alert(ajax.responseText);
// Write out the filename.
//document.getElementById(
"debugFile
nameConsol
e").innerH
TML="Saved
as<br><a target='_blank' href='"+ajax.responseText+
"'>"+ajax.
responseTe
xt+"</a><b
r>Reload this page to generate new image or click the filename to open the image file.";
}
}
ajax.send(canvasData);
}
Any help would be appreciated.
Thanks.