But if the data is too big to be put in the query string (2kb+), or if you want to make it harder for the user to see and modify the passed parameters, you'll need to post this data.
this JavaScript function makes the job, I post the string ("real long data").
function PostToPopup()
{
window.open("about:blank","popup",null,null);
var hdn= document.createElement("Input");
hdn.type="hidden";
hdn.name="popupdata";
var frm= document.createElement("Form");
frm.target="popup";
frm.method="POST";
frm.action="popup.aspx";
document.body.appendChild(frm);
frm.appendChild(hdn);
hdn.value="real long data";
frm.submit();
}
You can read this value in the popup from the request..this is an ASP.NET example:
Response.Write(Request.Form["popupdata"]);
No comments:
Post a Comment