Revision: 1517
http://mrbs.svn.sourceforge.net/mrbs/?rev=1517&view=rev
Author: jberanek
Date: 2010-10-20 11:42:27 +0000 (Wed, 20 Oct 2010)
Log Message:
-----------
* Made the new mandatory field checking Javascript code compatible
with IE, by using jQuery.
Modified Paths:
--------------
mrbs/trunk/web/edit_entry.php
Modified: mrbs/trunk/web/edit_entry.php
===================================================================
--- mrbs/trunk/web/edit_entry.php 2010-10-19 10:51:13 UTC (rev 1516)
+++ mrbs/trunk/web/edit_entry.php 2010-10-20 11:42:27 UTC (rev 1517)
@@ -437,20 +437,28 @@
}
echo "var mandatory_fields = [".implode(', ', $m_fields)."];\n";
?>
- for (i = 0; i < mandatory_fields.length; i++)
- {
- if (form[mandatory_fields[i]].value == '')
- {
- label = $("label[for="+mandatory_fields[i]+"]").html();
- label = label.replace(/:$/, '');
- alert('"' + label + '" ' +
- <?php echo '"'.
+
+ var return_val = true;
+
+ $.each(mandatory_fields,
+ function(index, value)
+ {
+ if ($("#"+value).val() == '')
+ {
+ label = $("label[for="+value+"]").html();
+ label = label.replace(/:$/, '');
+ alert('"' + label + '" ' +
+ <?php echo '"'.
str_replace('"', '\\"',
get_vocab("is_mandatory_field")
).
'"'; ?>);
- return false;
- }
+ return_val = false;
+ }
+ });
+ if (!return_val)
+ {
+ return return_val;
}
<?php
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits