curl-users
Re: Help with Javascript based submit button
Date: Sun, 19 Nov 2006 10:04:30 -0600
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>
> /////////////////////////
>
> 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.
> 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>
> <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