I took a quick gander at your site and source code, and I would say no to the iframe. An iframe is an html element that embeds another html document directly in your webpage. It doesn't seem to fit with what you're doing.
Everything works as it should, except one part:
Code:
function popupwnd(url, toolbar, menubar, locationbar, resize, scrollbars, statusbar, left, top, width, height)
{
var popupwindow = this.open(url, '', 'toolbar=' + toolbar + ',menubar=' + menubar + ',location=' + locationbar + ',scrollbars=' + scrollbars + ',resizable=' + resize + ',status=' + statusbar + ',left=' + left + ',top=' + top + ',width=' + width + ',height=' + height);
} here, your popupwindow variable is local, so you lose any reference to it when your function returns. Make it a global variable initialized to null, then either use window.open, if a popup hasn't been opened yet (i.e. the variable is still null) or change popupwindow.location if it has been opened. Here's an example that I'm using:
Code:
var newWindow = null;
function view(url) {
if (newWindow == null || newWindow.closed) {
newWindow = window.open(url, '_blank');
} else {
newWindow.location = url;
}
newWindow.focus();
return false;
} This code doesn't open the window in a popup, like yours; it simply opens a conventional window, which modern browsers usually put in a new tab. I would suggest for your usage that you actually do that instead, but a popup certainly isn't a sin. It's up to you.
A couple notes about the code:
-I used .closed to make sure that I didn't just change the location of a closed window. If you don't make this check, the window will still remain closed and your links won't appear to do anything if the user closes it when it first pops up.
-All calls to this method should open the url in the same separate window, unless you refresh. Then a reference to the old window will be lost, and you won't be able to access it anymore. The code will simply use another new window to do the same thing.