I build a json object in my javascript which I then want to post to a REST endpoint that returns a binary object (a PDF in this case). This should be opened in a new window or tab. I've seen examples on how to post a form into a new tab (Javascript Post on Form Submit open a new window) or how to send a request body with ajax (jQuery posting valid json in request body). But in this case I would need both and don't seem to find a solution. Is this even possible or would I need to put my json into a hidden form field and post it as a request parameter instead?
Asked
Active
Viewed 194 times
1
-
Well whatever you request via AJAX in the background, you would have to bring to the foreground yourself ... (meaning, you would have to populate the popup with whatever data you received.) – CBroe Apr 16 '18 at 07:36