RE: JS doesn't work if framed by another site

by "Cyanide _7" <leo7278(at)hotmail.com>

 Date:  Mon, 24 Jan 2000 15:55:19 CST
 To:  rcampbel(at)standard.com
 Cc:  hwg-languages(at)hwg.org
  todo: View Thread, Original
this should only be the case if the content was stolen, rather than the  
bandwidth. the relative pathname of the .js file is taken with respect to 
the page's location, not the frameset holding it. i believe the problem may 
be in how the .js file is interpreted, maybe even a browser issue. i believe 
it was discussed here many months ago as to what is executed in .js files. 
some browsers may or may not execute commands, only allowing for function 
and object definitions. in otherwords, you can define a function to run the 
break out of frames script, but it must be called from a script in the page. 
try viewing your framed page with a different browser/generation and see if 
it doesn't function properly then. - Cyanide_7


>From: Rebecca Campbell <rcampbel(at)standard.com>
>To: "'karloff'" <det1289(at)iperbole.bologna.it>, hwg-languages(at)mail.hwg.org
>Subject: RE: JS doesn't work if framed by another site
>Date: Mon, 24 Jan 2000 11:18:29 -0800
>
>sounds like you just need to include the entire location of the javascript
>file...
>
>src="http://www.yourserver.com/script/layerhtm.js"
>
>-rebecca
>http://www.nerdygirl.com
>
>-----Original Message-----
>From: karloff [mailto:det1289(at)iperbole.bologna.it]
>Sent: Monday, January 24, 2000 2:42 PM
>To: hwg-languages(at)mail.hwg.org
>Subject: JS doesn't work if framed by another site
>
>
>Hi, here's my problem:
>
>I've used a lot of Javascript in my home page
>http://www.galleriaborghese.com/index.htm ,
>but I've noticed a problem:
>The web directory http://sfera.supereva.it/ in the directory Arte/Grandi
>musei/ has made a link to my page, showing it in a frame.
>
>In my page I've included some code to avoid to be framed in other sites
>
>	<SCRIPT LANGUAGE="JavaScript">
>	<!--
>	if (parent.location.href != window.location.href)
>parent.location.href =
>window.location.href;
>	// -->
>	</SCRIPT>
>
>but some of the code is in some external javascript files
>
>	<SCRIPT LANGUAGE="JavaScript1.2" SRC="script/showhide.js"></SCRIPT>
>	<SCRIPT LANGUAGE="JavaScript1.2" SRC="script/layerhtm.js"></SCRIPT>
>
>Due to the use of external files, the code doesn't works at all: in fact
>it's impossible to load an external js file from a server different from
>mine (I guess it's a security option of my server, am I right?), and even
>the "unframing" code is not executed.
>
>Does someone knows how to load an external javascript file USING
>JAVASCRIPT, to write something like
>
>	if (parent.location.href == window.location.href)
>load("script/showhide.js");
>
>and beat the framer? Or should I copy my external code in the index.htm
>file (and in every page that includes external javascript files)?
>
>TIA
>Carlo
>
>
>| /\/ /      Carlo Fava (det1289(at)iperbole.bologna.it)
>|/|/\/       Art & Religion, www.romagiubileo.it/assisi/
>|\|\/\       Cinema, www.geocities.com/Hollywood/6841/viaggioinitalia/
>| \/\ARLOFF  Art, www.galleriaborghese.it

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA