Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I would like to have a live stream from a web camera in a Popup.FramedCloud. All I need to do is to insert this code in the HTML code parameter for popup:

<script src="http://www.live-events.ro/cam-acces-privat-delay.js.php?id=13" 
type="text/javascript">

From my tests this is not working. Please tell me if you tried this with success!

The script is correct, you can see it in action here.

I tried something more simple like "eval('a=1;alert(a)')" but with no success. I see the code in Firebug, but alert window does not appear.

The alternative I think of is to use other object for the popup, an Ext JS object maybe or some kind of reach tooltip library.

Thank you!

share|improve this question
    
Why dont you add your script into main js? –  Aragon Nov 14 '12 at 22:20
    
This script is using some protection based on referrer. I think I need to include it in this way, as it was designed. –  Bogdan Nov 15 '12 at 22:22
add comment

2 Answers

if you want set your html, you can use setContentHTML for openlayers. i dont know it works for you or not, but you can check out it here.

setContentHTML:function(    contentHTML )
Allows the user to set the HTML content of the popup.

Parameters
contentHTML {String} HTML for the div.

if it is not work, try to use iframe into popup.

i hope it works for you...

share|improve this answer
    
Thank you Aragon, I will try both solutions and came back here. –  Bogdan Nov 15 '12 at 15:15
add comment

Iframe works into popup, but is not a clean solution because I need to transport some variables to the JS script inside de iframe.

I can't use setContentHTML() function because I am using FeaturePopup library to show cluster popups. I asked Jorix for help to inject JS code. He made the library and already helped me very much with some related problems.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.