summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorxue <>2006-02-18 06:41:09 +0000
committerxue <>2006-02-18 06:41:09 +0000
commit64a5d4b6d3adaeab325d0e72d6c6c7624d861807 (patch)
tree683fd8d7cfa03e4c0eac93cb1f9bb19a3ba69457 /framework
parent8b9a5c2f0d5025e29a5477ea8cc8937db49b0341 (diff)
fixed an issue about TLinkButton always postback even if client validation fails.
Diffstat (limited to 'framework')
-rw-r--r--framework/Web/Javascripts/js/prado.js3
-rw-r--r--framework/Web/Javascripts/prado/form.js11
2 files changed, 10 insertions, 4 deletions
diff --git a/framework/Web/Javascripts/js/prado.js b/framework/Web/Javascripts/js/prado.js
index 2a1bbda5..0ca3c0b1 100644
--- a/framework/Web/Javascripts/js/prado.js
+++ b/framework/Web/Javascripts/js/prado.js
@@ -1680,6 +1680,9 @@ Prado.Validation.SetActiveGroup(Event.element(_378),_379["ValidationGroup"]);
Prado.Validation.SetActiveGroup(null,null);
}
if(Prado.Validation.IsValid(form)==false){
+if(_379["StopEvent"]){
+Event.stop(_378);
+}
return;
}
}
diff --git a/framework/Web/Javascripts/prado/form.js b/framework/Web/Javascripts/prado/form.js
index a9943e14..059aab5f 100644
--- a/framework/Web/Javascripts/prado/form.js
+++ b/framework/Web/Javascripts/prado/form.js
@@ -109,12 +109,15 @@ Prado.PostBack = function(event,options)
else
Prado.Validation.SetActiveGroup(null,null);
if(Prado.Validation.IsValid(form) == false)
+ {
+ if(options['StopEvent']) Event.stop(event);
return;
+ }
}
-
+
if(options['PostBackUrl'] && options['PostBackUrl'].length > 0)
form.action = options['PostBackUrl'];
-
+
if(options['TrackFocus'])
{
var lastFocus = $('PRADO_LASTFOCUS');
@@ -127,9 +130,9 @@ Prado.PostBack = function(event,options)
lastFocus.value = options['EventTarget'];
}
}
-
+
$('PRADO_POSTBACK_TARGET').value = options['EventTarget'];
- $('PRADO_POSTBACK_PARAMETER').value = options['EventParameter'];
+ $('PRADO_POSTBACK_PARAMETER').value = options['EventParameter'];
Event.fireEvent(form,"submit");
if(options['StopEvent']) Event.stop(event);
}