Results 1 to 3 of 3

Thread: Window widget with js on other domain

  1. #1
    Join Date
    Apr 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Window widget with js on other domain

    1) Script Title: DHTML Window widget (v1.02)

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...ndow/index.htm

    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.

    Code:
    <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")
    Code:
    <a href="#" onClick="parent.popwin.hide(); return false">
    Help appreciated

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

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

    http://phphost.smackum.com/test.html

    View the source to see that it is referencing an external source.
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Apr 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well, thats the problem. All is ok, except for closing the window with a button [parent.popwin.hide()] in the loaded html page.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •