Page 2 of 2

Re: Linking a Servoy NG client solution in an iframe

PostPosted: Mon Sep 17, 2018 6:09 pm
by chaitanyas
Hi Patrick,

Yes, js folder exist inside www folder and bridge.js file existed.

Re: Linking a Servoy NG client solution in an iframe

PostPosted: Mon Sep 17, 2018 8:54 pm
by ProRM
Hi Chaitanyas,

Your iframe line shows:

<iframe id="iframe" src='http://xxx.xxx.xxx.xx:xxxx/sample/solutions/sample/index.html?f=sampleMainFrm' style="width:100vw;height:100vh; display: none; border: none;"></iframe>

I think it should be:

<iframe id="iframe" src='http://xxx.xxx.xxx.xx:xxxx/sample/solutions/sample/index.html?f=sampleMainFrm' onload='Bridge.init(this);' style="width:100vw;height:100vh; display: none; border: none;"></iframe>

The onload for bridge is missing.

Regards,

Re: Linking a Servoy NG client solution in an iframe

PostPosted: Tue Sep 18, 2018 7:19 am
by chaitanyas
Hi ProRM,

Thanks for the reply, I have added onLoad function at iFrame but still no luck, now, I am getting blank screen and application not loading..

Re: Linking a Servoy NG client solution in an iframe

PostPosted: Tue Sep 18, 2018 11:25 am
by patrick
It's impossible to figure out what's going on like this. You are loading a bunch of scripts, execute client code onLoad, your solution might do all kinds of stuff onSolutionOpen etc.

In general when working with PhoneGap, it is very helpful to connect the device to a PC and inspect the running phonegap solution using Chrome developer tools on the PC. Google a bit to figure out how to set that up, sometimes a device driver is needed for that. While that might take a while to get it working, you will benefit a lot on the long run when you can see what goes on in the browser of the PhoneGap app.

It could also help maybe to simply run this html page locally to see what goes on in Chrome developer tools. Obviously, you need to remove any phonegap specific stuff, since you don't have that, but you can figure out the iframe portion.

Re: Linking a Servoy NG client solution in an iframe

PostPosted: Tue Sep 18, 2018 4:03 pm
by ProRM
Hi Chaitanyas,

You can start by using a simple index.html file in order to discard any other problem, like this:

<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://xxx.xxx.xxx.xx:xxxx/sample/solutions/sample/index.html" onload="Bridge.init(this);" height="100%" width="100%" frameborder="0"></iframe>
</div>
</body>
</html>

Re: Linking a Servoy NG client solution in an iframe

PostPosted: Wed Feb 05, 2020 4:28 pm
by francisco.garcia
Hi, i have the same problem.
Have you figured out any solution?