View Full Version : Window widget with js on other domain

04-11-2007, 10:09 PM
1) Script Title: DHTML Window widget (v1.02)

2) Script URL (on DD):

3) Describe problem: Looking to setup this popup on newspaper site. Loading a separate html file in a iframe. I would like to give them just a few lines of code where the css, js and html file are hosted on my domain. I have a test setup working but when trying to close the pop from a button in the html file I get permission denied. Is this cross domain security and not possible or am I doing something wrong?

Below are how it would look at the newspaper site. And also how I am closing the window.

<link rel="stylesheet" href="http://www.domain.com/folder/source/pop.css" type="text/css" />

<script type="text/javascript" src="http://www.domain.com/folder/source/pop.js">

var popwin=dhtmlwindow.open("box", "iframe", "http://www.domain.com/folder/source/pop.htm", "Internet", "width=560px,height=331px,resize=0,scrolling=0,center=1", "recal")

<a href="#" onClick="parent.popwin.hide(); return false">

Help appreciated

04-11-2007, 11:49 PM
It works fine for me at this demo (with the exception of the parent.popwin.hide() part, beings that I didn't use it.):


View the source to see that it is referencing an external source.
Hope this helps.

04-12-2007, 09:47 AM
Well, thats the problem. All is ok, except for closing the window with a button [parent.popwin.hide()] in the loaded html page.