5

I have Google Checkout javascript code inside of an HTML file hosted on a server. I can view the cart inside of the Android Emulator Browser, but when I point a WebView Activity to the URL, the error I get is Unsafe JavaScript attempt to access frame with URL and a blank page displays.

How come this doesn't work in the app but on the same browser the phone uses?

andrewsi
  • 10,807
  • 132
  • 35
  • 51

1 Answers1

1

Try to use

//ajax.googleapis.com/ajax/libs

instead of

http://ajax.googleapis.com/ajax/libs

Omitting the protocol (http or https) will allow the browser to request the file based on the current page protocol

Alexis Pigeon
  • 7,423
  • 11
  • 39
  • 44
yellowsir
  • 741
  • 1
  • 9
  • 27