HighDots Forums  

Changeing document.domain to a different domain

Javascript JavaScript language (comp.lang.javascript)


Discuss Changeing document.domain to a different domain in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Cindy Lee
 
Posts: n/a

Default Changeing document.domain to a different domain - 05-07-2004 , 05:49 PM






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?



Reply With Quote
  #2  
Old   
Cindy Lee
 
Posts: n/a

Default Re: Changeing document.domain to a different domain - 05-07-2004 , 06:41 PM






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://.....



"Ivo" <no (AT) thank (DOT) you> wrote

Quote:
"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





Reply With Quote
  #3  
Old   
Ivo
 
Posts: n/a

Default Re: Changeing document.domain to a different domain - 05-07-2004 , 06:43 PM



"Cindy Lee" typed> Can this be done in https?
Quote:
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




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.