Closed Thread Icon

Preserved Topic: frame whoas.... (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=17770" title="Pages that link to Preserved Topic: frame whoas.... (Page 1 of 1)" rel="nofollow" >Preserved Topic: frame whoas.... <span class="small">(Page 1 of 1)</span>\

 
timothymcnulty
Neurotic (0) Inmate
Newly admitted
posted posted 06-22-2000 13:31

Hello all. Let me see if I can explan this, I do not have a copy online.

I have 2 frames, 1 named nav, 1 named content.

Obviously, I want to click the buttons in th "nav" frame, and the html page chosen to appear in the "content" frame. I have no problem with this.

In one link I have a script that will ask for a password to appear once the entire document is loaded. The script is located in the document that appears in the "content" frame. When the user enters a password, if it is correct, the correct page will load into the "content" frame, if it is incorrect, another page will load in the "content" frame. All of this works fine as well.

My problem arrives after the script has been executed. in order to load the page in the "content" frame, I would enter the following code:

top.content.location = yes.html;
I receive an error stating that "content" is not defined.

So I change the script to look like this:

top.frame[0].location = yes.html;
This works fine. But when you go back to the other links in the "nav" section, and click on them, the html files that they are associated with no longer appears in the "content" frame, it loads into a new window.

I have never had a problem like this, and I feel pretty lost. I assume that the problem is how I reference the frame name, because the problem does not occur until the script is done executing.

I would appreciate the help a whole lot, thanks a lot!!



[This message has been edited by timothymcnulty (edited 22-06-2000).]

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 06-22-2000 15:59

Interesting. It sounds as though the window is not correctly named, although you've probably checked that already. If neither the links nor the JavaScript work on it... wait, try this; if there are frames outside of the 2 frames you're working with, then this should fix it (it should be done this way regardless): use parent.content.location rather than top.content.location.

Other than that, I can't think of the problem... as soon as you get that online, give us the address!

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 06-22-2000 18:00

Yeah -- that's my only suggestion: parent.content.location rather than top.content.location

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 06-22-2000 18:49

Here's another possibility. "content" might be a protected word in some situations, reserved for the javascript compiler. If the parent.content.location thing doesn't work, try changing your frame name to something more personal, like "XYzzY" or something unlikely to show up in part of the language.

Your pal, -doc-<P>

timothymcnulty
Neurotic (0) Inmate
Newly admitted
posted posted 06-23-2000 00:03

Hey all.

Well I tried:
parent.content.location;
and still had the same problem.

I renamed the "content" frame "stuff". I thought this might work. I do not receive an error now when I use: parent.stuff.location;

But(there is always a "but"), still when the links in the "nav" section are clicked, the specifed html document loads in a new window, rather than the "stuff" frame.

It is very strange. All of the links work fine, loading all of the documents in the "stuff" frame, until this password script is invoked.

The password script is in one of the html documents that loads into the "stuff" frame. When you click on the link in the "nav" frame, the html document loads into the "stuff" frame. I have the password script run once evrything is loaded, using what else, the onLoad() function. When the password is entered correctly or incorrectly, the specified html documents in the script also load just fine into the "stuff" frame. Then after the script is completely done executing, if you click on the links in the nav section, they will open in a new window.

Frankly, this scares the shit out of me, lol. I am about to throw my monitor out the window. If I get it online anytime soon I will for sure post the url. Until then, any suggestions would be much appreciated! Thanks a lot everyone.

-timothymcnulty

The society which scorns excellence in plumbing because plumbing is a humble activity, and tolerates shoddiness in philosophy because philosophy is an exalted activity, will have neither good plumbing nor good philosophy. Neither its pipes nor its theories will hold water. John W. Gardnern

[This message has been edited by timothymcnulty (edited 23-06-2000).]

timothymcnulty
Neurotic (0) Inmate
Newly admitted
posted posted 06-23-2000 01:49

OK, o I was wrong, well sort of. IE accepts parent.stuff, but netscape states that parent.stuff has no properties...(sigh)




The society which scorns excellence in plumbing because plumbing is a humble activity, and tolerates shoddiness in philosophy because philosophy is an exalted activity, will have neither good plumbing nor good philosophy. Neither its pipes nor its theories will hold water. John W. Gardnern

timothymcnulty
Neurotic (0) Inmate
Newly admitted
posted posted 06-23-2000 03:07

FINALLY!!! Ok, I figured it out. I used the parent.frames[0].name property to reveal the damn name of the frame AFTER the script had run. It turned out that the frame name was changing to the password. This happened because the variable that I used for the password was "name", therefore changing the frame "name" property to whatever was entered in the text field. I am sure glad this damn thing is over with. The struggle was worth the result, and I just learned from one more mistake. Thanks for your help!!!

timothymcnulty



The society which scorns excellence in plumbing because plumbing is a humble activity, and tolerates shoddiness in philosophy because philosophy is an exalted activity, will have neither good plumbing nor good philosophy. Neither its pipes nor its theories will hold water. John W. Gardnern

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 06-23-2000 09:08

Don't you just love it? <img border=0 align=absmiddle src="http://www.ozones.com/forum/mad.gif">

BTW, I love your new signature.

timothymcnulty
Neurotic (0) Inmate
Newly admitted
posted posted 06-23-2000 11:36

I love it only when the result is positive <img border=0 align=absmiddle src="http://www.ozones.com/forum/biggrin.gif">, which in time anything and everything will be. I actually enjoy the struggle of figuring these things out because it forces me to learn more.....

I saw the quote in an old psychology magazine I was reading, I had to share it with everyone, I love it!! <img border=0 align=absmiddle src="http://www.ozones.com/forum/biggrin.gif">


The society which scorns excellence in plumbing because plumbing is a humble activity, and tolerates shoddiness in philosophy because philosophy is an exalted activity, will have neither good plumbing nor good philosophy. Neither its pipes nor its theories will hold water. John W. Gardnern

[This message has been edited by timothymcnulty (edited 23-06-2000).]

« BackwardsOnwards »

Show Forum Drop Down Menu