Changeing document.domain to a different domain

C

Cindy Lee

I'm just trying to resize my iframe. when i try to get a document size in
my javascript. It gives me access denied.
resizingfunction(){
.....
var oFrame = document.all("dynamicFrame");//access denied
.....
}


<iframe name=dynamicFrame src=https://.....
 
I

Ivo

"Cindy Lee" typed> Can this be done in https?
If the page I'm on is at 'www.abc.com'
can I:
document.domain='www.def.com'

i get invalid argument if i do that? Is there anyway around this?

The document.domain branch in the DOM tree is read-only, sorry. What are you
trying to do anyway?

Overcome cross-domain security restrictions?
Good luck then, please enlighten us when you find a way.

Move to a page in that other domain? Then use simply
location.href="https://www.def.com/";
or
location.replace("https://www.def.com/");

AFAIK, javascript on a secure https page is no different from javascript on
an ordinary http.
HTH
Ivo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top