Solved

google picker popup --blocker

Posted on 2014-12-08
2
257 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
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…

948 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now