Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > Technical sections > Languages, Compilers, Interpreters > Algorithms
Register

Reply
 
LinkBack Thread Tools
Old 06.03.2002, 16:41   #1
Младенец
 
Join Date: 03 2002
Location: moon
Posts: 29
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Post top.location.replace - ?

Vot kusok java script-a kotory xochu ispol'zovat' dlya togo chtob opredelit' esli stranica prosmatrivaetsya v frame-e na chuzhem hoste ili net, i sootveststvenno pereyti na moy URL ili net.
No etot script ne rabotaet normal'no... v chem oshibka? ili est' sposob luchshe?

if (parent.location.hostname!="www.aaa.com") {top.location.replace="http://www.aaa.com"};

spasibo
lu
Reply With Quote
Old 06.03.2002, 17:33   #2
»
 
z0mbie's Avatar
 
Join Date: 01 2002
Posts: 777
Downloads: 1
Uploads: 0
Reputation: 0 | 0
Post

<blockquote><font size="1" face="MS Sans Serif, Verdana, Helvetica, sans-serif">quote:</font><hr>Originally posted by louie:
Vot kusok java script-a kotory xochu ispol'zovat' dlya togo chtob opredelit' esli stranica prosmatrivaetsya v frame-e na chuzhem hoste ili net, i sootveststvenno pereyti na moy URL ili net.
No etot script ne rabotaet normal'no... v chem oshibka? ili est' sposob luchshe?

if (parent.location.hostname!="www.aaa.com") {top.location.replace="http://www.aaa.com"};

spasibo
lu
<hr></blockquote>

tak po moemu luchshe:

if (self.parent.frames.length != 0) self.parent.location=document.location;
Reply With Quote
Old 07.03.2002, 18:06   #3
Младенец
 
Join Date: 03 2002
Location: moon
Posts: 29
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Talking

2 zOmbie:

Spasibo, mne prosto len' smotrt' JS documentaciu po kazhdomu povodu... vot v chem bila problema <img src="biggrin2.gif" border="0"> - delo v sitaksise : location.replace("http://www.aaa.com") <img src="wink-5.gif" border="0">

Spasibo za pomosh'

<img src="graemlins/nod.gif" border="0" alt="[Agree]" />

lu
Reply With Quote
Old 07.03.2002, 20:56   #4
Консервативн
 
VX's Avatar
 
Join Date: 01 2002
Location: Кавказская Албания
Posts: 889
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Post

Ya bi skazal parent.location.replace
Reply With Quote
Sponsored Links
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 17:07.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.