summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts
diff options
context:
space:
mode:
authorwei <>2007-01-06 03:36:40 +0000
committerwei <>2007-01-06 03:36:40 +0000
commitb8779f4a6a581cb378368eac398a262047397472 (patch)
treeec9949b1f2ebe9a1f9972e595b4d6a4b925103b9 /framework/Web/Javascripts
parentbde6488e19b9852011a657fda8aa39680d9c4a62 (diff)
Fixed #485.
Diffstat (limited to 'framework/Web/Javascripts')
-rw-r--r--framework/Web/Javascripts/js/compressed/ajax.js5
-rw-r--r--framework/Web/Javascripts/js/compressed/prado.js2
-rw-r--r--framework/Web/Javascripts/js/debug/ajax.js11
-rw-r--r--framework/Web/Javascripts/js/debug/prado.js4
-rw-r--r--framework/Web/Javascripts/prado/ajax3.js11
5 files changed, 26 insertions, 7 deletions
diff --git a/framework/Web/Javascripts/js/compressed/ajax.js b/framework/Web/Javascripts/js/compressed/ajax.js
index d1698aa5..ffc57483 100644
--- a/framework/Web/Javascripts/js/compressed/ajax.js
+++ b/framework/Web/Javascripts/js/compressed/ajax.js
@@ -99,8 +99,9 @@ Ajax.Responders.register({onComplete:function(request)
Prado.CallbackRequest.tryNextRequest();}});Event.OnLoad(function()
{if(typeof Logger!="undefined")
Ajax.Responders.register(Prado.CallbackRequest.Exception);});Prado.CallbackRequest.prototype={initialize:function(id,options)
-{this.url=window.location.href;this.request=null;this.Enabled=true;this.id=id;if(typeof(id)=="string")
-Prado.CallbackRequest.requests[id]=this;this.options=Object.extend({RequestTimeOut:30000,EnablePageStateUpdate:true,HasPriority:true,CausesValidation:true,ValidationGroup:null,PostInputs:true},options||{});},setCallbackParameter:function(value)
+{this.url=this.getCallbackUrl();this.request=null;this.Enabled=true;this.id=id;if(typeof(id)=="string")
+Prado.CallbackRequest.requests[id]=this;this.options=Object.extend({RequestTimeOut:30000,EnablePageStateUpdate:true,HasPriority:true,CausesValidation:true,ValidationGroup:null,PostInputs:true},options||{});},getCallbackUrl:function()
+{return $('PRADO_PAGESTATE').form.action;},setCallbackParameter:function(value)
{this.options['params']=value;},getCallbackParameter:function()
{return this.options['params'];},setRequestTimeOut:function(timeout)
{this.options['RequestTimeOut']=timeout;},getRequestTimeOut:function()
diff --git a/framework/Web/Javascripts/js/compressed/prado.js b/framework/Web/Javascripts/js/compressed/prado.js
index e2df8e08..a1da1efb 100644
--- a/framework/Web/Javascripts/js/compressed/prado.js
+++ b/framework/Web/Javascripts/js/compressed/prado.js
@@ -284,7 +284,7 @@ if(typeof(element)=="string")
method.toFunction().apply(this,[element,""+content]);}
else
{method.toFunction().apply(this,[""+content]);}},extractContent:function(text,boundary)
-{f=RegExp('(<!--'+boundary+'-->)([\\s\\S\\w\\W]*)(<!--//'+boundary+'-->)',"m");result=text.match(f);if(result&&result.length>=2)
+{var f=RegExp('(<!--'+boundary+'-->)([\\s\\S\\w\\W]*)(<!--//'+boundary+'-->)',"m");var result=text.match(f);if(result&&result.length>=2)
return result[2];else
return null;},evaluateScript:function(content)
{content.evalScripts();}}
diff --git a/framework/Web/Javascripts/js/debug/ajax.js b/framework/Web/Javascripts/js/debug/ajax.js
index c2822f10..9b1046ba 100644
--- a/framework/Web/Javascripts/js/debug/ajax.js
+++ b/framework/Web/Javascripts/js/debug/ajax.js
@@ -734,7 +734,7 @@ Prado.CallbackRequest.prototype =
/**
* Callback URL, same url as the current page.
*/
- this.url = window.location.href;
+ this.url = this.getCallbackUrl();
/**
* Current callback request.
@@ -759,6 +759,15 @@ Prado.CallbackRequest.prototype =
},
/**
+ * Gets the url from the forms that contains the PRADO_PAGESTATE
+ * @return {String} callback url.
+ */
+ getCallbackUrl : function()
+ {
+ return $('PRADO_PAGESTATE').form.action;
+ },
+
+ /**
* Sets the request parameter
* @param {Object} parameter value
*/
diff --git a/framework/Web/Javascripts/js/debug/prado.js b/framework/Web/Javascripts/js/debug/prado.js
index ca95bfbb..9a6cc823 100644
--- a/framework/Web/Javascripts/js/debug/prado.js
+++ b/framework/Web/Javascripts/js/debug/prado.js
@@ -3023,8 +3023,8 @@ Prado.Element =
extractContent : function(text, boundary)
{
- f = RegExp('(<!--'+boundary+'-->)([\\s\\S\\w\\W]*)(<!--//'+boundary+'-->)',"m");
- result = text.match(f);
+ var f = RegExp('(<!--'+boundary+'-->)([\\s\\S\\w\\W]*)(<!--//'+boundary+'-->)',"m");
+ var result = text.match(f);
if(result && result.length >= 2)
return result[2];
else
diff --git a/framework/Web/Javascripts/prado/ajax3.js b/framework/Web/Javascripts/prado/ajax3.js
index 4783800f..f6bb048f 100644
--- a/framework/Web/Javascripts/prado/ajax3.js
+++ b/framework/Web/Javascripts/prado/ajax3.js
@@ -446,7 +446,7 @@ Prado.CallbackRequest.prototype =
/**
* Callback URL, same url as the current page.
*/
- this.url = window.location.href;
+ this.url = this.getCallbackUrl();
/**
* Current callback request.
@@ -471,6 +471,15 @@ Prado.CallbackRequest.prototype =
},
/**
+ * Gets the url from the forms that contains the PRADO_PAGESTATE
+ * @return {String} callback url.
+ */
+ getCallbackUrl : function()
+ {
+ return $('PRADO_PAGESTATE').form.action;
+ },
+
+ /**
* Sets the request parameter
* @param {Object} parameter value
*/