Surya
Surya

Reputation: 149

how to pass large data to a jsp without submitting to server

I need to open a pop up window from a jsp and pass a json data to the new window. I have tried passing data through a query string / setting it in cookies i.e. setCookie("dataString",dataString,10);
But they are not able to hold large amounts of data. The pop up window shows preview of the form, so i don't want to store this data anywhere.

Upvotes: 1

Views: 657

Answers (1)

WPrecht
WPrecht

Reputation: 1382

This is a pretty old problem, the easy answer is have the child access the data from the parent:

var opener = window.opener;
if(opener) {
    var oDom = opener.document;
    var elem = oDom.getElementById("your element");
    if (elem) {
        var val = elem.value;
    }

}

Upvotes: 1

Related Questions