🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.javascript
Article #62

Re: HELP NEEDED with script error "permission denied"

#62
From: Martin Honnen
Date: Sat, 24 Jun 2000 00:00
50 lines
2340 bytes

Erik van Roekel wrote:
> 
> On http://evroekel.cjb.net i'm using the following script:
> 
> <SCRIPT type="text/javascript">
> <!-- Hide this code from non-JavaScript browsers
>       var L=top.location.pathname;
>       var B=L.lastIndexOf("/");
>       var L=L.substring(B+1);
> 
>       if (L.substring(0,7)=="header_") {
>         top.location=L.substring(7)};
>       if (L.substring(0,5)=="body_") {
>         top.location=L.substring(5)};
> 
>     // End hiding -->
> </SCRIPT>
> 
> I'm using frames on my site. This scripts checks if the contentpage is
> loaded directly and if so, it loads the correct framesetpage.
> 
> Two examples:
> 
> If the page http://evroekel.cjb.net/html/body_aruba.html is loaded the
> script will redirect the user to the correctpage
> http://evroekel.cjb.net/html/aruba.html
> 
> And if the page http://evroekel.cjb.net/html/header_aruba.html is
> loaded the script will also redirect the user to the correctpage
> http://evroekel.cjb.net/html/aruba.html
> 
> BUT I get an error "permission denied" and I don't know what's wrong
> with the script !

That usually happens when your script is loaded from another host than
the one the document is loaded from whose properties you try to access
> 
> Can some java-expert help me, please ?! TIA !
> 
> Regards,
> Erik van Roekel
> http://evroekel.cjb.net

-- 

	Martin Honnen
	http://javascript.faqts.com/
	http://home.t-online.de/home/martin.honnen/jsgoddies.html
Technical Details
Message-ID: <3954B847.79AB4112@t-online.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3953b7e7.1115674@news.arnhem.chello.nl>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10731d,ba63bfa8bac40758
X-Google-Attributes: gid10731d,public
X-Google-Thread: fb3cb,ba63bfa8bac40758
X-Google-Attributes: gidfb3cb,public
From: Martin Honnen <Martin.Honnen@t-online.de>
Subject: Re: HELP NEEDED with script error "permission denied"
Date: 2000/06/24
Message-ID: <3954B847.79AB4112@t-online.de>
X-Deja-AN: 638452328
Content-Transfer-Encoding: 7bit
References: <3953b7e7.1115674@news.arnhem.chello.nl>
X-Accept-Language: en
X-Sender: 340033544582-0001@t-dialin.net
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@t-online.de
X-Trace: news.t-online.com 961858747 10 22493 340033544582-0001 000624 14:59:07
Organization: Liberty Development
Mime-Version: 1.0
Newsgroups: comp.lang.javascript,borland.public.intrabuilder.javascript