also you may like to take a look at implementing the form ajax style, i.e. provide your own Submit handler, instead of using the html form Submit..which does a page refresh.
crossbrowser toolkits for this kind of work in both pure javascript or perl-javascript are becoming more abundant by the day.
the hardest line to type correctly is: stty erase ^H