Fixed JavaScript handling for the clients w/functional but undetected JS support
authorshort <>
Thu, 20 Jun 2002 14:14:46 +0000 (14:14 +0000)
committershort <>
Thu, 20 Jun 2002 14:14:46 +0000 (14:14 +0000)
common.php

index 528f671..b755991 100644 (file)
@@ -620,7 +620,7 @@ function print_form_radkova_inzerce($readonly,$total,$submit_name,$submit_value)
               >Zaslat daòový doklad?</td><td colspan="3"><input type="checkbox" name="doklad"<?php
                        print(""
                                        // some hacks as "readonly" not supported for "checkbox"es (->"disabled" for them)
-                                       .($readonly ? "" : " onclick=\"sum_total(this)\"")
+                                       .(!($have_js || $readonly) ? "" : " onclick=\"sum_total(this)\"")
                                        .(!($have_js || $readonly) ? "" : " disabled=\"disabled\"")
                                        .(!isset($doklad) ? "" : " checked=\"checked\"")
                                        .ereg_replace(" readonly=\"readonly\"","",$addons)." />");
@@ -632,7 +632,8 @@ function print_form_radkova_inzerce($readonly,$total,$submit_name,$submit_value)
        </table></td></tr>
 <tr><td align="center" id="submit_button"><?php
                print("<input type=\"submit\" name=\"$submit_name\" value=\"".htmlspecialchars($submit_value)."\""
-                               ." onclick=\"return(validate(this.form))\" />");
+                               .(!($have_js || $readonly) ? "" : " onclick=\"return(validate(this.form))\"")
+                               ." />");
                ?></td></tr>
 </table></form>
 </blockquote>