0

I have the following code:

new Ext.Window({
        title: 'My PDF',
        height: 400,
        width: 600,
        bodyCfg: {
            tag: 'iframe',
            src: projectparameters.service + '__pdfService.php',
            params: {
                projectparameters: projectparameters_encoded,
                featureIDs: featureIDs_encoded
            },
            style: 'border: 0 none'
        }
    }).show();

I am trying to send parameters to the __pdfService.php Is this at all possible? I have tried using ifrmaes, but then the pdf 'encoding' is displayed instead of the actual pdf.

I cannot think that it can be such a mission do something this simple!!!

PS: If I query the service it returns a pdf in the window. So it works, I just want to send parameters through to make the pdf flexible

2
  • 1
    try to append to the src property something like this. '__pdfService.php?param1=' + encodeURIComponent(param1) + '&param2=' + encodeURIComponent(param2) and remove the params: {[...]} part Commented Aug 27, 2015 at 12:51
  • Thank you, seems to work..feels like a hack though. Post it as an answer and I'll accept it. Commented Aug 27, 2015 at 13:43

1 Answer 1

1

Update you code to and replace the param1 and param2 with your param names

  new Ext.Window({
            title: 'My PDF',
            height: 400,
            width: 600,
            bodyCfg: {
                tag: 'iframe',
                src: projectparameters.service + '__pdfService.php?param1=' + encodeURIComponent(param1) + '&param2=' + encodeURIComponent(param2),
                style: 'border: 0 none'
            }
    }).show();
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you. Its working. Not the way I would have liked, but it gets the job done.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.