Linking a Servoy NG client solution in an iframe

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

Re: Linking a Servoy NG client solution in an iframe

Postby chaitanyas » Mon Sep 17, 2018 6:09 pm

Hi Patrick,

Yes, js folder exist inside www folder and bridge.js file existed.
chaitanyas
 
Posts: 101
Joined: Tue Jul 26, 2011 8:28 am

Re: Linking a Servoy NG client solution in an iframe

Postby ProRM » Mon Sep 17, 2018 8:54 pm

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,
User avatar
ProRM
 
Posts: 72
Joined: Thu Sep 18, 2008 10:24 pm
Location: Uruguay

Re: Linking a Servoy NG client solution in an iframe

Postby chaitanyas » Tue Sep 18, 2018 7:19 am

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..
chaitanyas
 
Posts: 101
Joined: Tue Jul 26, 2011 8:28 am

Re: Linking a Servoy NG client solution in an iframe

Postby patrick » Tue Sep 18, 2018 11:25 am

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.
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3692
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Linking a Servoy NG client solution in an iframe

Postby ProRM » Tue Sep 18, 2018 4:03 pm

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>
User avatar
ProRM
 
Posts: 72
Joined: Thu Sep 18, 2008 10:24 pm
Location: Uruguay

Re: Linking a Servoy NG client solution in an iframe

Postby francisco.garcia » Wed Feb 05, 2020 4:28 pm

Hi, i have the same problem.
Have you figured out any solution?
francisco.garcia
 
Posts: 12
Joined: Tue Jan 09, 2018 3:40 pm

Previous

Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 3 guests

cron