PDA

View Full Version : Script not working when in frames...


jaredwalczak
11-17-2002, 10:33 PM
Hello!

I have designed a new website, which can currently be found at http://www.walczakconsultants.com/jared/tcj/index.html

As that address is quite long, I decided to sign up with CJB.net, a redirection and URL cloaking service. My short URL is http://conservativejournal.cjb.net

The cloaking puts the page in a frame (invisibly - the page looks the same) and this is somehow ruining my page. The JavaScript navigation on the site is no longer working properly and error messages are popping up. I emailed CJB.net about the problem and received the following reply:

"With URL Cloaking on the site is viewed inside of a frame. Check over the java code and update the problem areas."

[Note: It's JavaScript code, not Java... but anyways...]

Obviously some JavaScript works fine with cjb.net cloaking... so what's wrong here? What's causing the error?

Unfortunately, this is probably a big task to determine and I don't expect anyone to have to spend hours figuring it out for me. I guess I'm just hoping that someone can go to the two pages, quickly spot the error and let me know what it is...

Thanks in advance.

Sincerely,
Jared Walczak

Algorithm
11-18-2002, 12:11 AM
Since you have all your script in seperate source files (which are rather difficult to access), I didn't look at the scripts themselves. However, given the errors declared, I'd advise you run a search through your source files for any mention of "top.location". If anything does, that's probably your problem.

Ankun
11-18-2002, 05:48 AM
you could also consider a more simplistic approach..either a) logging into your cjb.net account and telling it not to mask your url, or b) just add a frame breaker onto your site..then it'll break from the frame and the problem is solved..though I'm sure using a) would keep your file size down by 1KB or 2..

jaredwalczak
11-18-2002, 12:46 PM
The URL cloaking is required unless you sign up for their premium account and I believe a break-out-of-frames script is against the policy.

However, the original suggestion DID help me fix the problem. Thanks!