Forum Moderators: open

Message Too Old, No Replies

cross-site javascript - permission challenges

Error: uncaught exception: Permission denied to get property Window.

         

simonInOz

5:42 am on Mar 17, 2005 (gmt 0)

10+ Year Member



I'm building a a collection of web site all running on the same server. It's frame based, I have a bunch of pages in frames that do stuff (all on the same site eg [fred:8080...] then eventually they launch another page in a frame (same server, different site eg [fred:8080...]

I want to load some data I have in the MAIN pages into the DAFT page. I though to do this by using something like
<script>document.write(parent.CLIENTname);</script>

but all I get is permission problems:
Error: uncaught exception: Permission denied to get property Window.CLIENTname

I'm guessing that Firefox does not allow me to access info in a page from another site. I thought it would only do that for different domains, and they are the same domain.

I've tried calling a function in another frame and the same thing happens (though it works for pages on the same site).

Any suggestions? (this will eventually need to work in IE too)

thanks
Simon in Sydney (where it is currently grey and rainy, though it was gorgeous yesterday)

SpaceFrog

8:01 am on Mar 17, 2005 (gmt 0)

10+ Year Member



Most strange that you get this permission failiure having site on same root!
Maybe some special feature of your provider?

by the way what is CLIENTName?

to avoid this permission problem you could try to call function from page of which you want to get name and then pass this name onto the main page

Steve from France where we are expecting some sunshine soon ...

simonInOz

9:36 pm on Mar 21, 2005 (gmt 0)

10+ Year Member



Oh, the embarrassment ... I had one part of the site accessed as [localhost:8080...] and another part as [mymachine:8080...]

Sorted that out and all is fine.

Blush, blush ...
Simon