2

I want to pass data from parent window to child window when using window.open (popup new window)

Originally, I wrote code as below

Parent Window Side

var orignalTextPopup = window.open("popup/orignalText", '_blank', 'width=900,height=700,scrollbars=yes');
orignalTextPopup.data = data;

Child Window Side

fn_showOrginalText(window.data);

It works fine with chrome, But in Internet Explorer environment it doesn't work. How can I pass the value to child window ?? Please help me :'(

Henrik
  • 2,771
  • 1
  • 23
  • 33
  • You could pass the data as a [query parameter](https://en.wikipedia.org/wiki/Query_string) to the new page. – Olian04 Nov 21 '17 at 13:22
  • @Pete Thanks for advice ! – eunhye jung Nov 22 '17 at 01:30
  • @Olian04 I think if I use query parameter it would be restricted to length limit. – eunhye jung Nov 22 '17 at 01:33
  • I highly doubt that. The HTTP protocol doesn't have a "maximum query string length", and the smallest length in modern browsers to date is [81k characters and belongs to Edge](https://stackoverflow.com/questions/812925/what-is-the-maximum-possible-length-of-a-query-string). – Olian04 Nov 22 '17 at 13:45

0 Answers0