a) No. It's simple form clicking (Submit or Reset). So if button type is "Submit" when form is send. WWW::Mechanize can't handle Javascript.
b) It's simple Javascript code. It change form action attribute before sending (to IPAllocSubNets.asp). So you need to change form action attribute and when submit the form.