Index: branches/htmlform/cgi-bin/main.cgi
===================================================================
--- branches/htmlform/cgi-bin/main.cgi	(revision 476)
+++ branches/htmlform/cgi-bin/main.cgi	(revision 477)
@@ -140,17 +140,12 @@
 }
 elsif ($webvar{action} eq 'nodesearch') {
-  open HTML, "<../nodesearch.html";
-  my $html = join('',<HTML>);
-  close HTML;
-
   $sth = $ip_dbh->prepare("SELECT node_id, node_name FROM nodes ORDER BY node_type,node_id");
   $sth->execute() or print "DEBUG: failed retrieval from nodes: ".$sth->errstr,"<br>\n";
-  my $nodes = '';
+  my @nodelist;
   while (my ($nid,$nname) = $sth->fetchrow_array()) {
-    $nodes .= "<option value='$nid'>$nname</option>\n";
-  }
-  $html =~ s/\$\$NODELIST\$\$/$nodes/;
-
-  print $html;
+    my %row = (nodeid => $nid, nodename => $nname);
+    push @nodelist, \%row;
+  }
+  $page->param(nodelist => \@nodelist);
 }
 
