I am working on a website. Here I want to import gmail contacts. To achieve this, in the parent page(php), I have added a link as mentioned below.
<a style="font-size:25px;font-weight:bold;" href="https://accounts.google.com/o/oauth2/auth?client_id=213413545397468.apps.googleusercontent.com&redirect_uri=https://localhost/oauth/oauth.php&scope=https://www.google.com/m8/feeds/&response_type=code" onclick="window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=880,height=550'); return false;">Click here to Import Gmail Contacts</a>
Below this link there is a textarea, where I want to populate all gmail addresses.
When I click on this link, a new popup window is opened which allows me to log in to gmail. Once I log in, it displays all the gmail addresses in the address book in the popup window itself.
As mentioned earlier, I want to populate the textarea with the gmail address. So, for that I have added a javascript in the child php to populate the parent page.
window.opener.document.getElementById('textarea').value ='email addresses';
But nothing gets populated in the textarea.