Linking a Servoy NG client solution in an iframe

Questions and answers on developing, deploying and using plugins and JavaBeans

Linking a Servoy NG client solution in an iframe

Postby Thomas.shuttleworth » Wed Jun 14, 2017 2:11 pm

Hi,

I'm trying to link to a Servoy NG Solution, using an iframe in a Phonegap app. The iframe is coming up blank and i've been looking at the Adobe forums trying to find what i'm doing wrong. After making sure i'm doing everything right on the Phonegap side of things I thought maybe there is a unique condition when a Servoy solution is being called to and perhaps someone here might know more about it.

Thanks in advance.
Thomas.shuttleworth
 
Posts: 22
Joined: Wed Apr 05, 2017 5:08 pm

Re: Linking a Servoy NG client solution in an iframe

Postby ProRM » Thu Jun 15, 2017 2:29 am

Hi Thomas,

Can you share the index.html you are using to do the phonegap build?

Here you have a sample:

<html>
<head>
<script src="phonegap.js"></script>
<script src="bridge.js"></script>
<script src="push.js"></script>
</head>
<body style="margin: 0px;">
<div style="position: absolute; top: 0px; bottom: 0px; left: 0px; right: 0px; margin-top: 30px; margin-left: 10px; margin-right: 10px;">
<iframe src="http://208.43.220.45:8080/MisPrecios2017/solutions/misPrecios/index.html" onload="Bridge.init(this);" height="100%" width="100%" frameborder="0"></iframe>
</div>
</body>
</html>

Regards,
User avatar
ProRM
 
Posts: 49
Joined: Thu Sep 18, 2008 10:24 pm
Location: Uruguay

Re: Linking a Servoy NG client solution in an iframe

Postby Thomas.shuttleworth » Thu Jun 15, 2017 10:35 am

Hi Juan,

This the index.html i'm currently using, it simplified it to try and get the iframe working before adding anything extra.

<html>
<head>
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'; img-src * data: 'unsafe-inline'; connect-src * 'unsafe-inline'; frame-src *;">
</head>
<body>
<div>
<iframe src="http://192.168.0.12:8080/solutions/testCamera/index.html?f=frmCamera" height="400" width="300"></iframe>
</div>
</body>
</html>

Thanks
Thomas.shuttleworth
 
Posts: 22
Joined: Wed Apr 05, 2017 5:08 pm

Re: Linking a Servoy NG client solution in an iframe

Postby Thomas.shuttleworth » Thu Jun 15, 2017 12:15 pm

I got the answer from a guy on the Phonegap forum, I'd forgotton to include the cordova-whitelist-plugin which solved my problem and displayed the solution in the iframe.
Thomas.shuttleworth
 
Posts: 22
Joined: Wed Apr 05, 2017 5:08 pm

Re: Linking a Servoy NG client solution in an iframe

Postby ProRM » Thu Jun 15, 2017 10:53 pm

great!
User avatar
ProRM
 
Posts: 49
Joined: Thu Sep 18, 2008 10:24 pm
Location: Uruguay


Return to Plugins and Beans

Who is online

Users browsing this forum: Bing [Bot] and 4 guests