[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
www.dhtmlgoodies.com • View topic - DHTML modal dialog script - problem on try to get URL
Page 1 of 1

DHTML modal dialog script - problem on try to get URL

PostPosted: Mon Apr 02, 2007 7:46 am
by topgun
HI

I have download the DHTML modal dialog script source zip from web site, i unzip all the files and folder, and point my IIS server to that folder. When i run the demo-modal-message.html, The static message is working fine, but when i try to loaded message from external files, It get problem to get the URL file?

on the Html file, it has the function
onclick="displayMessage('includes/demo-modal-message-1.inc');return false"

I double check the url page is exist on my server by type "http://localhost/includes/demo-modal-message-1.inc" and it show up correctly.

Then i run the code in debug, i find it get problem in ajax.js , the self.responseStatus[0] = "405"
here is the code inside ajax.js get error


this.runAJAX = function(urlstring) {
if (this.failed) {
this.onFail();
} else {
this.createURLString(urlstring);
if (this.element) {
this.elementObj = document.getElementById(this.element);
}
if (this.xmlhttp) {
var self = this;
if (this.method == "GET") {
totalurlstring = this.requestFile + this.queryStringSeparator + this.URLString;
this.xmlhttp.open(this.method, totalurlstring, true);
} else {
this.xmlhttp.open(this.method, this.requestFile, true);
try {
this.xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
} catch (e) { }
}

this.xmlhttp.onreadystatechange = function() {
switch (self.xmlhttp.readyState) {
case 1:
self.onLoading();
break;
case 2:
self.onLoaded();
break;
case 3:
self.onInteractive();
break;
case 4:
self.response = self.xmlhttp.responseText;
self.responseXML = self.xmlhttp.responseXML;
self.responseStatus[0] = self.xmlhttp.status;
self.responseStatus[1] = self.xmlhttp.statusText;

if (self.execute) {
self.runResponse();
}

if (self.elementObj) {
elemNodeName = self.elementObj.nodeName;
elemNodeName.toLowerCase();
if (elemNodeName == "input"
|| elemNodeName == "select"
|| elemNodeName == "option"
|| elemNodeName == "textarea") {
self.elementObj.value = self.response;
} else {
self.elementObj.innerHTML = self.response;
}
}
if (self.responseStatus[0] == "200") {
self.onCompletion();
} else {
self.onError(); }

self.URLString = "";
break;
}
};

this.xmlhttp.send(this.URLString);
}
}
};

Same here

PostPosted: Wed Aug 15, 2007 5:14 pm
by cyberbillp

php fixes it

PostPosted: Wed Aug 15, 2007 5:56 pm
by cyberbillp