Results 1 to 6 of 6
  1. #1
    e561414 is offline Member
    Join Date
    Jul 2014
    Posts
    3
    Rep Power
    0

    Default Download contents of popups massively, probably html related

    Hi, what's up, everybody. This is Edgar and this is the first time I come here.

    So, straight to the point... There's a website I have to consult in order to have my invoices printed out. The problem is that I have over one thousand invoices to print, and I can only print them by clicking a button that opens a pop up window, which turns into a download dialog with the PDF file, one at a time... Which, of course, it's really time consuming and it may lead to errors.

    I was checking the source code and the list of invoices had this html format for each invoice
    Java Code:
    <tr id="listCFDIs_row6"  class="even"  onmouseover="this.className='highlight'"  onmouseout="this.className='even'" >
    		<td>6</td>
    		<td style="text-align:center;" >650</td>
    		<td style="text-align:center;" >CCI971201KP1</td>
    		<td>XXXX(2)</td>
    		<td style="text-align:right;" >127525.74</td>
    		<td style="text-align:center;" >22/07/2014 16:05:08</td>
    		<td style="text-align:center;" ><img src='./imagenes/icons/activo16.png' style='border:0px'/></td>
    		<td style="text-align:center;" >Sin Pagos</td>
    		<td style="text-align:center;" ><a href=SCFDDetalle?sIdCFD=47398D67-331E-40AE-84E1-80E6C3107FED><img title='Ver detalle' border=0 src='./imagenes/icons/preliminar16.png' style='border:0px' title='Ver detalle'/></a><img title="Descargar PDF" src="imagenes/table/pdf.gif" class="img_cursor" onclick="window.open('SCFD2PDF?idcfd=47398D67-331E-40AE-84E1-80E6C3107FED','PDF', '' );"/><img title="Descargar XML" src="imagenes/icons/xml16.png" class="img_cursor" onclick="window.open('SXMLVer?idcfd=47398D67-331E-40AE-84E1-80E6C3107FED','XML', '' );"/><a href=SRegistrarPagoCFD?Id=47398D67-331E-40AE-84E1-80E6C3107FED><img src='./imagenes/icons/pago16.png' style='border:0px' title='Registrar pago'/></a></td>
    	</tr>
    This part is what I suppose I should be interested in:
    Java Code:
    onclick="window.open('SCFD2PDF?idcfd=47398D67-331E-40AE-84E1-80E6C3107FED','PDF', '' )
    I know nothing about java but my intuiton tells me I could automate the downloads somehow... So what can I do? is the string after the "window.open" a complement of a URL or how do I deal with this?

    I've tried a few extensions for chrome and firefox that are supposed to download all of the links, but none of the extensions listed the PDF files as a downloadable entity, they just list other things...


    I have no idea what I have to do, but I hope there's a way. Thank you all for your time and sorry for the long first post.

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,969
    Rep Power
    8

    Default Re: Download contents of popups massively, probably html related

    This appears to be javascript, not Java.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    e561414 is offline Member
    Join Date
    Jul 2014
    Posts
    3
    Rep Power
    0

    Default Re: Download contents of popups massively, probably html related

    Hello, Kevin
    Should I delete this post or there's any hope of help?

  4. #4
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,969
    Rep Power
    8

    Default Re: Download contents of popups massively, probably html related

    I've moved this thread to the forum lobby since it's not about Java. We have a few members who try to answer JavaScript question, but you'll probably have better luck asking on a JavaScript forum.

    As always, when crossposting to multiple sites across the internet, you should link between them so people know if you found an answer elsewhere.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    DaveW is offline Member
    Join Date
    Jul 2014
    Posts
    8
    Rep Power
    0

    Default Re: Download contents of popups massively, probably html related

    You could write a Java program that parses the html, finds the links for pdfs, downloads them and prints them, but if you know nothing about Java then it's going to be a while before you have the knowledge to do that. It would probably be quicker to do it in something like Python.

  6. #6
    e561414 is offline Member
    Join Date
    Jul 2014
    Posts
    3
    Rep Power
    0

    Default Re: Download contents of popups massively, probably html related

    I have a deadline, so I guess I will do it manually this time since I don't know how to code in any language (yet).

    I appreciate the help and if I find a solution, I'll make sure I post it here. Thank you all for your time and consideration.

    Have a great day

Similar Threads

  1. Replies: 1
    Last Post: 04-27-2012, 07:14 AM
  2. Display Folder and contents as HTML links
    By JPR in forum New To Java
    Replies: 3
    Last Post: 01-06-2012, 09:45 PM
  3. Replies: 1
    Last Post: 02-23-2010, 09:48 AM
  4. GET html contents from a web server
    By mjzammit in forum Networking
    Replies: 2
    Last Post: 03-14-2009, 07:47 AM
  5. Replies: 1
    Last Post: 11-06-2008, 04:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •