Hi,
I use windows to display some webcam streams. I don’t want all the streams to be loaded at once, but only when the window
is shown. For this, I put an iframe in the window. That works well, but now I’d like the windows to be created dynamically, like this:
for (i = 0; i < baseWindows.length; i++)
{
$('#' + baseWindows[i]).jqxWindow({ autoOpen: false, showCollapseButton: true, maxHeight: 400, maxWidth: 700, minHeight: 200, minWidth: 200, height: 300, width: 500, theme: 'darkblue' });
}
The problem I have here is with the ‘show’ event. If I bind the event like this:
$(‘#’ + baseWindows[i]).bind(‘show’, function (event) { // Some code here. });
I have no way to know what window it is. The goal of the for loop is that I don’t need to know which window i’m currently
creating here. I just go through a list of windows name.
I want my show event to set the iframe location. For this, I would need the event to give the window id and do something like:
$(‘#jqxWindow’).bind(‘show’, function (event) { $(‘#’ + event.args.id + ‘iFrame’)[0].src = getUrlForWindow(event.args.id); });
Sadly, there is no such event.args.id (or is there?)
Could anyone give me a solution for this?
Hoping I’ve been clear enough…
Thanks.