E
E
Evgeny Komarov2015-07-03 12:22:56
PHP
Evgeny Komarov, 2015-07-03 12:22:56

How to open a new tab in the browser by sending POST to it?

Good day.
The problem is the following - I send ajax data to the server and get a response in the form of json, which looks like this

{"success":false,"type":2,"code":1000,"message":["Текст_1.","Текст_2."]}

The page displays a block with these messages. There can be many messages, so at the bottom of the block a link is made in more detail, which should open these messages in a new tab. And now the question itself, which baffles me - how to open a tab, passing this json to it with a post?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2015-07-03
@maNULL

Create a form with attributes target="_blank" and method="post" , and write the data in hidden fields. Style the submit button to your liking, you can make it look like a link.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question