Author: mhabersack
Date: 2007-01-03 17:16:40 -0500 (Wed, 03 Jan 2007)
New Revision: 70440
Modified:
trunk/mcs/class/System.Web/System.Web.UI/ChangeLog
trunk/mcs/class/System.Web/System.Web.UI/Page.cs
Log:
JavaScript validation fix
Modified: trunk/mcs/class/System.Web/System.Web.UI/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI/ChangeLog 2007-01-03 22:12:52 UTC
(rev 70439)
+++ trunk/mcs/class/System.Web/System.Web.UI/ChangeLog 2007-01-03 22:16:40 UTC
(rev 70440)
@@ -1,3 +1,8 @@
+2007-01-03 Marek Habersack <[EMAIL PROTECTED]>
+
+ * Page.cs: Make sure the ValidatorOnSubmit function is defined for the
+ document before attempting to use it.
+
2007-01-01 Vladimir Krasnov <[EMAIL PROTECTED]>
* Control.cs: fixed ResolveClientUrl, wrong when control that calls
Modified: trunk/mcs/class/System.Web/System.Web.UI/Page.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI/Page.cs 2007-01-03 22:12:52 UTC
(rev 70439)
+++ trunk/mcs/class/System.Web/System.Web.UI/Page.cs 2007-01-03 22:16:40 UTC
(rev 70440)
@@ -955,7 +955,7 @@
writer.WriteLine ("\tvar theForm;\n\tif
(document.getElementById) {{ theForm = document.getElementById ('{0}'); }}",
formUniqueID);
writer.WriteLine ("\telse {{ theForm = document.{0}; }}",
formUniqueID);
writer.WriteLine ("\tfunction __doPostBack(eventTarget,
eventArgument) {");
- writer.WriteLine ("\t\tif(!ValidatorOnSubmit()) return;");
+ writer.WriteLine ("\t\tif(document.ValidatorOnSubmit &&
!ValidatorOnSubmit()) return;");
writer.WriteLine ("\t\ttheForm.{0}.value = eventTarget;",
postEventSourceID);
writer.WriteLine ("\t\ttheForm.{0}.value = eventArgument;",
postEventArgumentID);
writer.WriteLine ("\t\ttheForm.submit();");
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches