fame has asked for the wisdom of the Perl Monks concerning the following question:

ok so im having a little issue maybe someone can help me .. I have a script that form fills a site and then submits the info, but I cant figure out how to make the script submit.. on other sites i have had it work... many times but now its not working out with this particular site, maybe someone can give a little insight

<td class="BBFormButtonCell DonationButtonCell" colspan="3"> <input type="submit" name="PC1685$ctl00$btnNext" v +alue="Donate Now" onclick="(function(btn){var bDisableMe=true;__doPos +tBack('PC1685$ctl00$btnNext','');btn.disabled=bDisableMe;})(this);ret +urn false;" id="PC1685_ctl00_btnNext" class="BBFormSubmitButton Donat +ionSubmitButton" />

thats the clip from the site where it shows to submit for the donation, i have tried the following:

$agent->click('PC1685$ctl00$btnNext'); $agent->click_button(value => "Donate Now"); $agent->submit();

none of these seem to click/submit the form.. any info would be greatly appreciated. thanks...

Replies are listed 'Best First'.
Re: formfill script/click button
by daxim (Curate) on Aug 08, 2012 at 09:49 UTC
    Maybe you have the wrong form? Your problem description is very meager, without your complete HTML and Perl code it's difficult to figure out what goes wrong.

    Try submit_form(with_fields => { … }.

      its the correct form, i added a spot for it to log the form right after the submission so i can see the result and if it did indeed submit or not, the rest of the form gets filled and it is the correct one, just doesnt submit, but i will try with what you suggested, thank you for your response

        it didnt work out but thanks for your response :) its appreciated..