Popup Window Not Working on iOS, Need JQuery
<p>I have a popup code in Javascipt which works fine in the regular browser however in iOS/iPad/iPhone, I am not able to get this code working. My popup window send input to the parent window.</p>

<p>How can I write code in Jquery to replace this?</p>

<p>My current code:</p>

<pre><code>Parent.php

&lt;html&gt;
&lt;head&gt;

&lt;SCRIPT LANGUAGE="JavaScript"&gt;
    function popupwindow(url, title, w, h) {
  var left = (screen.width/2)-(w/2);
  var top = (screen.height/2)-(h/2);
  return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
        };
    &lt;/SCRIPT&gt; 

&lt;/head&gt;
&lt;body&gt;
&lt;input type="image" name="btnAddToCart" src="&lt;?php echo $pd_thumbnail;?&gt;" onClick="popupwindow('include/child.php?pid=&lt;?=$pd_id?&gt;','Title', '200','200');" class="addToCartButton"&gt; 

&lt;input type="text" id="details_&lt;?=$pd_id?&gt;" name="details_&lt;?=$pd_id?&gt;"&gt;
 &lt;/body&gt;


child.php

&lt;!--compatibility mode--&gt;
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;? 
$pid=$_GET['pid'];
$cart_url = '../cart.php?action=add&amp;p='.$pid;
//echo $cart_url;
?&gt;

&lt;/head&gt;
&lt;body&gt;
&lt;SCRIPT LANGUAGE="JavaScript"&gt;
&lt;!-- Begin
function sendValue(val){

window.opener.document.getElementById('details_&lt;?=$pid?&gt;').value = val;

window.opener.location.href='&lt;?php echo $cart_url; ?&gt;&amp;sp='.concat(val);

window.close();
window.location.reload();
}
//  End --&gt;
&lt;/script&gt;
&lt;form name="selectform"&gt;

&lt;input id="1" name="details_&lt;?=$pid?&gt;" value="1" type="radio"     onClick="sendValue(this.value);"&gt;HOT&lt;br&gt;
&lt;input id="1" name="details_&lt;?=$pid?&gt;" value="2" type="radio" onClick="sendValue(this.value);"&gt;Medium&lt;br&gt;
&lt;input id="1" name="details_&lt;?=$pid?&gt;" value="3" type="radio" onClick="sendValue(this.value);"&gt;Mild&lt;br&gt;
        &lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
