cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Help with Javascript based submit button

From: michael mittiga <mmittiga17_at_gmail.com>
Date: Sun, 19 Nov 2006 11:37:41 -0500

The only thing I find in the html code referencing that java script is:

function submitHandler() {
    if (isFieldEmpty(document.ExecDataDownload.AcctNum, "Please choose at
least one account number in Step One."))
                  return false;

    if (isFieldEmpty(document.ExecDataDownload.InfoType, "Please choose at
least one type of account information to download in Step Two."))
                  return false;

    if (isFieldEmpty(document.ExecDataDownload.Month, "Please choose at
least one time frame to download in Step Three."))
                  return false;

    return true;
}

function infoTypeChanged() {
    if (document.ExecDataDownload.InfoType.value=="H")
        document.ExecDataDownload.Month.disabled = true;
    else
        document.ExecDataDownload.Month.disabled = false;

    return;
}

Thanks for looking!
On 11/19/06, Ralph Mitchell <ralphmitchell_at_gmail.com> wrote:
>
> On 11/19/06, michael mittiga <mmittiga17_at_gmail.com> wrote:
> > Happy Sunday Everyone,
> >
> > I am try to use curl to automate the dowloading of a daily file. I am
> able
> > to login and select the criteria to be submitted through the curl
> command:
> >
> > Curl>curl -v -u xxxxx:xxxxx "
> >
> https://xxxx.xx.com/Accounts/servlet/Download?HashedEdgeRegID=xxxxxxxxx&EdgeRegID=xxxxxxxxxx&PWS_USAID=&appName=pwedge&TabName=Holdings&E=33&SE=1653&UF=&LC=us-eng&CC=usd&Cntry=US&EdgeCli
> >
> tSegment=xxx%2xxxx%2xxxxx%xxxx%2xxxx&AcctNum=+BX+xxxxxx&which=&AllAcct=N&Page=0"
> >
> > This returns the page I need to get to and all of the form values
> needed.
> >
> > What is the next step to get the submit button to submit? it is not as
> > simple as &submit=true.
> > /////////////////////
> > <A HREF="javascript:document.ExecDataDownload.submit()"
> > onmouseover="self.status='Download'; return true;"
> > onmouseout="self.status=''; return true;"><script>document.write("<IMG
> > alt='Download' border='0'
> >
> src='/OLS/images/contentImages/"+color_scheme+"/bpDownloadblue.gif'>")</script></A>&nbsp;&nbsp;
> > /////////////////////////
> >
> > Here is what the form source looks like:
> >
> > After you click the 'Download' button, you will be prompted to save a
> > file with a .csv extension to your hard drive or designated
> > storage.
> > &nbsp;&nbsp;Once the file has been saved, it can be accessed
> via
> > a
> > spreadsheet, accounting, or portfolio management software
> > program.
> > <BR><BR>
> > <input type=hidden name=DAcctNum value="xxxxxx">
> > <input type=hidden name=EdgeRegID value="xxxxxx">
> > <input type=hidden name=HashedEdgeRegID value="xxxxxxxxx">
> > <input type=hidden name=appName value="pwedge">
> > <input type=hidden name="PWS_USAID" value="">
> > <input type=hidden name=EdgeClientSegment value="xxxxxx">
> > <A
> > HREF="javascript:document.ExecDataDownload.submit()"
> > onmouseover="self.status='Download'; return true;"
> > onmouseout="self.status=''; return true;"><script>document.write ("<IMG
> > alt='Download' border='0'
> >
> src='/OLS/images/contentImages/"+color_scheme+"/bpDownloadblue.gif'>")</script></A>&nbsp;&nbsp;
> > <A HREF="javascript:document.ExecDataDownload.reset ()"
> > onmouseover="self.status='Reset'; return true;" onmouseout="
> self.status='';
> > return true;"><script>document.write("<IMG alt='Reset' border='0'
> >
> src='/OLS/images/contentImages/"+color_scheme+"/bpResetblue.gif'>")</script></A>
> > <br><br>
> > </td>
> > </tr>
> >
> >
> > Thank you for your suggestions!
> >
>
> I'm not all that familiar with javascript, as such, but I have managed
> to defeat quite a few javascript form submits... :) Is
> ExecDataDownload a builtin javascript function?? If not, you need to
> find out what it does. Are there any script tags either loading
> javascript files or with inline javascript?? You'll need to dig
> through them looking for that function. It may validate the data in
> some way, or fiddle with the form variables, ending with the final
> submit() statement.
>
> Ralph Mitchell
>
Received on 2006-11-19