modification at C:\Program Files\Construct 2\exporters\html5\plugins\ajax\runtime.js
makes local!!! file ajax in wp8 works well. (commented 6 //cranberrygame comments)
this code snippet is for previous issue
thanks
...
try
{
//request = new XMLHttpRequest();//cranberrygame (1/6)
request = new ActiveXObject("Microsoft.XMLHTTP");//cranberrygame (2/6)
request.onreadystatechange = function()
{
if (request.readyState === 4)
{
self.curTag = tag_;
if (request.responseText)
self.lastData = request.responseText.replace(/\r\n/g, "\n"); // fix windows style line endings
else
self.lastData = "";
if (request.status >= 400)
self.runtime.trigger(cr.plugins_.AJAX.prototype.cnds.OnError, self);
else
{
// In node-webkit, don't trigger 'on success' with empty string if file not found
if (!isNodeWebkit || self.lastData.length)
self.runtime.trigger(cr.plugins_.AJAX.prototype.cnds.OnComplete, self);
}
}
};
//request.onerror = errorFunc;//cranberrygame (3/6)
//request.ontimeout = errorFunc;//cranberrygame (4/6)
//request.onabort = errorFunc;//cranberrygame (5/6)
//request["onprogress"] = progressFunc;//cranberrygame (6/6)
request.open(method_, url_);
// Workaround for CocoonJS bug: property exists but is not settable
try {
request.responseType = "text";
} catch (e) {}
if (method_ === "POST" && data_)
{
if (request["setRequestHeader"])
{
request["setRequestHeader"]("Content-Type", "application/x-www-form-urlencoded");
}
request.send(data_);
}
else
request.send();
}
catch (e)
{
errorFunc();
}
...