We help IT Professionals succeed at work.

use fancybox to display external webpage?

Reece
Reece asked
on
I use the fancybox script to display images, video and google maps on my website, but what I want to do is have one open an external website...  the external website is a single page (using an IP address and port number) showing our coast guard tower's harbour-cam.
The site looks like it just loads a screenshot of what the webcam saw at the time of page load, so I'd want the fancyboxed page to refresh every 3 seconds.

Any ideas how I can do all of this?
Comment
Watch Question

RobOwner (Aidellio)
CERTIFIED EXPERT
Most Valuable Expert 2015

Commented:
Have you set the type to 'iframe' and then href to your address and port?
Owner (Aidellio)
CERTIFIED EXPERT
Most Valuable Expert 2015
Commented:
eg:

<a id="various3" href="http://www.yahoo.com">Iframe</a>

Open in new window


			$("#various3").fancybox({
				'width'				: '75%',
				'height'			: '75%',
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});

Open in new window

ReeceICT Consultant
CERTIFIED EXPERT

Author

Commented:
thanks dude!  All I was missing was the second bit of code in my <script> for fancybox.

How can I make it refresh the contents of the "iframe" every 3 seconds though.

www.ftba.org.au > click the yawcam "eyeball" next to the right hand speaker and you will see what I mean.
RobOwner (Aidellio)
CERTIFIED EXPERT
Most Valuable Expert 2015

Commented:
sorry i can't see the "eyeball" could you send a screenshot showing what you mean?
ReeceICT Consultant
CERTIFIED EXPERT

Author

Commented:
haha... sorry, I hadn't uploaded my edited html file to the server yet.

Don't worry though, I  figured it out - the youcam install on at the Coastal Patrol tower has a stream configured as well.  So rather than using the http://121.223.221.114:8888 link in my iFrame, I'm using http://121.223.221.114:8081.

Thanks for helping me get it working though!
RobOwner (Aidellio)
CERTIFIED EXPERT
Most Valuable Expert 2015

Commented:
good stuff and glad we got it working

Explore More ContentExplore courses, solutions, and other research materials related to this topic.