Page 1 of 2

[ANSWERED]: Iframe help

PostPosted: Tue Oct 08, 2013 4:12 pm
by gbiski
I have created an html with an iframe containing my graphs at thinkspeak.
I want this html to be embedded on one of my control pages. In this way to be able to see it via my web browser or indigo touch.
I tried but with no success.
Which is the technique to achieve it?

Thanks

Re: Iframe help

PostPosted: Mon Oct 21, 2013 4:07 pm
by gbiski
Any help on this issue?

Re: Iframe help

PostPosted: Mon Oct 21, 2013 4:26 pm
by jay (support)
Control pages cannot contain iframes - and even if they could Indigo Touch couldn't show them because it doesn't render control pages via html. An alternative would be to do it the other way around: put the control page into an iframe.

Re: Iframe help

PostPosted: Mon May 11, 2015 2:31 am
by MarcoGT
jay (support) wrote:
An alternative would be to do it the other way around: put the control page into an iframe.


How can I do that?

Thanks

Re: Iframe help

PostPosted: Mon May 11, 2015 4:32 am
by DaveL17
MarcoGT wrote:
How can I do that?

Take a look at this post which shows some example code that places Indigo control pages into HTML iFrames. It requires a little HTML coding on your part, but it's pretty straightforward once you get the hang of it.

Dave

Re: Iframe help

PostPosted: Mon May 11, 2015 6:34 am
by MarcoGT
Thanks,

so then in my CP as "Client Action" I have to select "Go to external URL"?
Or, how can I load that CP?

Thanks
Marco

Re: Iframe help

PostPosted: Mon May 11, 2015 7:28 am
by MarcoGT
Now I have a test.html containing iframes with WUnderground charts + Thingspeak charts, it it just a test.
Now, I to use it inside Indigo?

Thanks

Re: Iframe help

PostPosted: Mon May 11, 2015 9:02 am
by DaveL17
MarcoGT wrote:
Thanks,

so then in my CP as "Client Action" I have to select "Go to external URL"?
Or, how can I load that CP?

Thanks
Marco

That's my preferred approach.

Put a static image on the CP and then link to external URL. I also like to have something on the page with iFrames to send the user back to Indigo CP (in case the browser back button isn't obvious...)

Dave

Re: Iframe help

PostPosted: Sat May 16, 2015 5:53 am
by MarcoGT
Which address do you configure?
Something like file:///<path_to_file> or something like http://<ip_address>:<port>/<path>?

IP address is of course the IP address where Indigo Server is running, and what about port?
Shall I start a Web Server on the MacMini (running Indigo Server)?

Thanks

Re: Iframe help

PostPosted: Sat May 16, 2015 6:14 am
by DaveL17
I need to revise my prior statement. Now I'm not so sure that I ever did load an external URL from the Indigo server through a control page. I may have done it directly from a bookmark in the browser. Perhaps Matt or Jay could weigh in here on whether its possible to load a local HTML file through the IWS.

Dave

Re: Iframe help

PostPosted: Mon May 18, 2015 6:40 am
by MarcoGT
Ok, thanks
I will wait for an answer from M&J :)

Re: Iframe help

PostPosted: Mon May 18, 2015 3:41 pm
by matt (support)
I believe you will need to start Apache on your Mac to serve the file using an http:/// URL. The file:/// URL would only work if you accessed it from Safari on the Mac that hosted that file (likely your Indigo Mac).

That said, I think I have an easier way. The above approach is complicated since it requires Apache to run, and then you'll need to do router port forwarding/etc. to get access to that server when away from your house (reflectors only work for the Indigo web server, not Apache).

But if the file you want to server is straight HTML and not PHP/etc., then you can just drop it into this folder:

Code: Select all
/Library/Application Support/Perceptive Automation/Indigo 6/IndigoWebServer/static/

It will then be accessible from Indigo's web server directly. If you are using a reflector the format to access foo.html would be:

http://yourreflector.indigodomo.net/static/foo.html

Re: [ANSWERED]: Iframe help

PostPosted: Mon May 18, 2015 11:09 pm
by MarcoGT
Thanks Matt, I will go for the easier way?
Is this the standard approach to have iframes in Indigo CP?

Thanks :)

Re: [ANSWERED]: Iframe help

PostPosted: Tue May 19, 2015 8:50 am
by matt (support)
Control Pages themselves cannot have iframes, but you can embed a Control Page into an iframe of another HTML file (is that what you are doing?).

Re: [ANSWERED]: Iframe help

PostPosted: Tue May 19, 2015 9:07 am
by MarcoGT
Yes, this is what I would like to do.