Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Post data to a new popup window without using hidden input fields

Tags:

jquery

ajax

popup

Is it possible to post data to a new window without using hidden input fields. Data can be possibly quite large. Looking at something similar to jQuery ajax type post.. except I need to post the data to a new page.

like image 470
bcm Avatar asked Dec 06 '22 02:12

bcm


1 Answers

A hidden form is the standard approach to this. I don't recall if the following has complications, but you may even be able to create the form on the fly and submit it. In my opinion, there's nothing wrong with this approach. Another possibility is to use jQuery.post() and in the callback function open a new window and paste the returned content. For example,

var win = window.open();
win.document.write(returnedContent);
like image 133
TNi Avatar answered May 09 '23 23:05

TNi