onclick of the button calls a javascript function, therefore I don't think just clicking the button through Mechanize will serve the purpose (unless any other module for javascript such as WWW::Mechanize::Plugin::JavaScript is used.)
If you look at the javascript code
if (ck==true){
$.post("rpc.f", {credenU: ""+user+"", credenP: ""+pass+"", mns: 1}
+, function(data){
if(data.length >0) {
$('#serverlisted').html(data);
}
});
}
else{
$.post("rpc.f", {credenU: ""+user+"", credenP: ""+pass+""}, functi
+on(data){
if(data.length >0) {
$('#serverlisted').html(data);
}
});
it seems that JSON data is posted to url "rpc.f" and the data returned is added to #serverlisted (should be an id to div, span or any other tag on page.)
In my view you need to post the data
which is either
{credenU: ""+user+"", credenP: ""+pass+"", mns: 1}
or
{credenU: ""+user+"", credenP: ""+pass+""}
based on value of mms
to url "rpc.f" and replace the response recived on tag #serverlisted
Update: Corrected the typo. thanks marto for pointing it.
|