Henry Lyne (henrylyne) wrote in changelog,
Henry Lyne
henrylyne
changelog

[livejournal] r14832: LJSV-533: Remove unnecessary javascript ...

Committer: henrylyne
LJSV-533: Remove unnecessary javascript and just let the Submit buttons be enabled all the time.

U   trunk/htdocs/lostinfo.bml
Modified: trunk/htdocs/lostinfo.bml
===================================================================
--- trunk/htdocs/lostinfo.bml	2009-01-30 12:44:58 UTC (rev 14831)
+++ trunk/htdocs/lostinfo.bml	2009-01-30 16:22:59 UTC (rev 14832)
@@ -36,7 +36,7 @@
 
         $ret .= "<div class='form-basic form-fix'><div class='tl'><div class='tr'><div class='br'><div class='bl'>\n";
         $ret .= "<fieldset><label>$ML{'.enter_username'}</label>\n";
-        $ret .= LJ::html_text({ 'name' => 'user', 'id' => 'userlost', 'size' => 30, 'maxlength' => 15, onkeyup => 'enable_pass();'}) . "</fieldset>\n";
+        $ret .= LJ::html_text({ 'name' => 'user', 'id' => 'userlost', 'size' => 30, 'maxlength' => 15 }) . "</fieldset>\n";
         $ret .= "<fieldset><label>$ML{'.enter_email_optional'}</label>\n";
         $ret .= LJ::html_text({ 'name' => 'email_p', 'size' => 30, 'maxlength' => 50 }) . "</fieldset>\n";
         $ret .= "<div class='btn-set'>\n";
@@ -47,24 +47,11 @@
         $ret .= "<?p $ML{'.lostusername.text'} p?>\n";
         $ret .= "<div class='form-basic form-fix'><div class='tl'><div class='tr'><div class='br'><div class='bl'>\n";
         $ret .= "<fieldset><label>$ML{'.enter_email'}</label>\n";
-        $ret .= LJ::html_text({ 'name' => 'email_u', 'id' => 'email_u', 'size' => 30, 'maxlength' => 50, onkeyup => 'enable_user();' }) . "</fieldset>\n";
+        $ret .= LJ::html_text({ 'name' => 'email_u', 'id' => 'email_u', 'size' => 30, 'maxlength' => 50 }) . "</fieldset>\n";
         $ret .= "<div class='btn-set'>\n";
         $ret .= LJ::html_submit('lostuser', $ML{'.btn.proceed'}, { id => 'lostuser' }) . "</div>\n";
         $ret .= "</div></div></div></div></div>\n";
 
-        $ret .= qq( <script type="text/javascript">
-                    function enable_pass () {
-                        \$("lostpass").disabled = !\$("userlost").value;
-                    }
-                    function enable_user () {
-                        \$("lostuser").disabled = !\$("email_u").value;
-                    }
-
-                    enable_pass();
-                    enable_user();
-                    </script>
-                  );
-
         $ret .= "</form>\n";
 
         return $ret;

Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 3 comments