Solved

google picker popup --blocker

Posted on 2014-12-08
2
270 Views
Last Modified: 2014-12-13
Hello,
  I have implement the Google picker on my page. However, on the Iphone and other device the user need to  disable popup blocker on the browser.  Is there any method to bypass this manual setting

Here my code on the button click
 gapi.client.load('drive', 'v2', null);
            gapi.load('auth', { 'callback': onAuthApiLoad });
            gapi.load('picker');
            function onAuthApiLoad() {
                window.gapi.auth.authorize({
                    'client_id': data.clientID,
                    'immediate': false,
                    'scope': ['https://www.googleapis.com/auth/drive']
                }, handleAuthResult);
            }
 var oauthToken;
            function handleAuthResult(authResult) {
                if (authResult && !authResult.error) {
                    oauthToken = authResult.access_token;
                    createPicker();
                }
            }
            function createPicker() {
                var picker = new google.picker.PickerBuilder()
                    .addView(new google.picker.DocsView())
                    .setOAuthToken(oauthToken)
                    .setCallback(pickerCallback)
                    .build();
                picker.setVisible(true);
            }
function pickerCallback(data) {
            //function pickerCallback(data) {
                if (data.action == google.picker.Action.PICKED) {
                  
                    var doc = data.docs[0];
                    var fileId = doc.id;
                    var request = gapi.client.drive.files.get({
                        'fileId': fileId
                    });
                    request.execute(function (resp) {
                        var token = gapi.auth.getToken();
                       
                        var fileData = {
                            name: resp.title,
                            link: resp.downloadUrl,
                            accessToken: token.access_token,
                            tokenType: token.token_type,
                            mimeType: resp.mimeType
                        };
                    });
                }

Open in new window

0
Comment
Question by:SiemensSEN
2 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 40486789
Is there any method to bypass this manual setting

No, of course.
Maybe open in a css popup
0
 

Author Comment

by:SiemensSEN
ID: 40497818
I see some sites like career builder.com that include drop box and they seems to have some method to work-a-round this issue
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question