Reputation: 571
I want to show a pdf using google viewer like this:
But my page should be opened with parameters like this:
https://mywebsite.com/pdfgenerator.xhtml?parameter1=true¶meter2=false
(On this page a pdf is generated, and that is not a valid website)
That means that I should pass parameters within the url parameter of the first page, but then they get interpreted as the parameters for the first page.
How do I solve this problem? How do I pass a parameter within a parameter? I can't find any information about it.
Thank you for your help.
Upvotes: 0
Views: 111
Reputation: 571
It's solved: If you encode it using encodeURIComponent and then pass it as the parameter it works. If you need to do it quickly you can use this TryIt from W3Schools. Adjust the address, click run and click the button, then copy the link.
Upvotes: 1