How do I handle the call back using multiple Google File Picker

前端 未结 2 1296
小鲜肉
小鲜肉 2021-01-28 10:20

If I have multiple Google Drive File Pickers on one page how do I handle the callback to ensure the data is passed to the correct section?

I basically have a number of i

相关标签:
2条回答
  • 2021-01-28 11:03

    You can change the callback function that the picker uses with this line:

    .setCallback(pickerCallback)
    

    Use a different callback for each picker, or even use an anonymous function.

    0 讨论(0)
  • 2021-01-28 11:07

    As Eric said use the setCallback method.

    If you want to pass a parameter to a callback use an anonymous function:

    .setCallback(function(data){pickerCallback(data,"MYPICKERID")})

    0 讨论(0)
提交回复
热议问题