in reply to Follow-up Javascript Hyperlink
sub doPostBack { my $agent = shift; ## WWW::Mechanize agent-object passed in my $target = shift; ## first argument in the __doPostBack() cal +l in javascript my $arg = shift; ## second argument in the __doPostBack() ca +ll in javascript # convert the passed in string $target =~ s/\$/:/g; $agent->form_number(1); $agent->field('__EVENTTARGET', $target); $agent->field('__EVENTARGUMENT', $arg); $agent->submit(); } #endsub doPostBack # function __doPostBack(eventTarget, eventArgument) { # var theform; # if (window.navigator.appName.toLowerCase().indexOf("microsoft") > + -1) { # theform = document.MTMMAIN; # } # else { # theform = document.forms["MTMMAIN"]; # } # theform.__EVENTTARGET.value = eventTarget.split("$").join(":"); # theform.__EVENTARGUMENT.value = eventArgument; # theform.submit(); # }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Follow-up Javascript Hyperlink
by jiperez (Initiate) on Feb 14, 2012 at 14:08 UTC | |
|
Re^2: Follow-up Javascript Hyperlink
by enemyofthestate (Monk) on Jan 08, 2014 at 23:18 UTC |