optimize javascript to handle large numbers of POPs
authorivan <ivan>
Fri, 4 Jul 2003 00:51:30 +0000 (00:51 +0000)
committerivan <ivan>
Fri, 4 Jul 2003 00:51:30 +0000 (00:51 +0000)
FS/FS/svc_acct_pop.pm
fs_signup/FS-SignupClient/cgi/signup.cgi

index 3c9ea01..bb2d3fd 100644 (file)
@@ -142,8 +142,7 @@ sub popselector {
     
     function popstate_changed(what) {
       state = what.options[what.selectedIndex].text;
-      for (var i = what.form.popnum.length;i > 0;i--)
-                what.form.popnum.options[i] = null;
+      what.form.popnum.options.length = 0
       what.form.popnum.options[0] = new Option("", "", false, true);
 END
 
@@ -182,7 +181,7 @@ END
 
 =head1 VERSION
 
-$Id: svc_acct_pop.pm,v 1.7 2002-04-10 13:42:48 ivan Exp $
+$Id: svc_acct_pop.pm,v 1.7.4.1 2003-07-04 00:51:30 ivan Exp $
 
 =head1 BUGS
 
index d483435..c0d1616 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: signup.cgi,v 1.29.2.6 2003-06-24 15:34:41 ivan Exp $
+# $Id: signup.cgi,v 1.29.2.7 2003-07-04 00:51:30 ivan Exp $
 
 use strict;
 use vars qw( @payby $cgi $locales $packages $pops $init_data $error
@@ -397,8 +397,7 @@ sub popselector {
     
     function popstate_changed(what) {
       state = what.options[what.selectedIndex].text;
-      for (var i = what.form.popnum.length;i > 0;i--)
-                what.form.popnum.options[i] = null;
+      what.form.popnum.options.length = 0;
       what.form.popnum.options[0] = new Option("", "", false, true);
 END