Tree Drag&Drop - stay within iframe and block frame origin

Dear members,

I have read a couple of posts regarding frag & drop between iframes but I think my problem is a little bit different.
I have an index.html at e.g. master.domain.com that includes an iframe.
The source of the iframe is iframe.domain.com. The iframe source includes the dhtmlxTree with drag & drop enabled.
Now I only want the magic to happen within this iframe. The parent is just a container but the drag and drop does not even has to leave the iframe.
I tried to include the following lines into the parent file:

But no success. I always get
Uncaught SecurityError: Blocked a frame with origin “http://iframe.domain.com” from accessing a frame with origin “http://master.domain.com”. Protocols, domains, and ports must match.

Again … I don’t even want to drag & drop between any frames or the iframe and its parent.
I would like to have the drag&drop functionality solely within the iframe.

I hope you can help me out on this

Hello,

you can try to define document.domain for both pages.

document.domain = “domain.com”;

Hope it will help.

@Alexandra:

Thanks a lot. That did the trick.

Thank you so much. Sorry for the late reply.