• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

how to send file to browser without using valence viewport

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to send file to browser without using valence viewport

    I've tried to send a pdf file to the front end via the below code, it needs to get an ID from the front end then output the related PDF.

    Front end code: ('12345' is to simplify the sample code, it will be a variable in real life)
    var GetPDF = function() {
    Ext.core.DomHelper.append(document.body,{
    tag: 'iframe',
    frameBorder: 0,
    width: 0,
    height: 0,
    css: 'display:none;visibility:hidden;height:1px;',
    src: 'pgm0001.pgm?&id=12345'
    });
    };


    The program I am having is that when I do "id = vvIn_Num('id')" in my backend rpg program(pgm0001), it always gives me value of 0.

    Could you let me know what the right way to do it?

    Thanks,
    Dan

  • #2
    Try removing the ampersand. Normally the first parameter in a url parm string gets a question mark and then subsequent parms get the ampersand.

    So instead of:

    Code:
    pgm0001.pgm?&id=12345
    try:

    Code:
    pgm0001.pgm?id=12345

    Comment


    • #3
      Thank you very much, Richard. I've corrected it as per your suggestion and it works great.

      Dan

      Comment

      Working...
      X