http://calcg.org/newlogo2.png Not Logged in.
Login | Register

General Discussion Board \ Site \ Frames and X/HTML

Click here to log in (you must be logged in to post comments).

AuthorComment
allynfolksjr
Administrator
avatar
Posted: 11 Aug 2004
18:04 GMT
Total Posts: 1892
Okay, B said you should know how to do this, Z.

I want to have it so if you type in a page like this http://www.nssfis.com/quotes.html

It automatically loads the frames like on this http://www.nssfis.com/index2.html

but only adds the frames if they arn't already there. And unfortunately, I don't have any html books handy (in a monumental oversight). If you could help, I'd appreciate it. Thanks

[Edited by allynfolksjr on 12-Aug-04 03:06]
zkostik
Carrier
avatar
Posted: 11 Aug 2004
19:55 GMT
Total Posts: 2486
Umm...I'm not exactly sure what you're looking for. It'd be kinda nice if you could be more specific. Are you referring to building frameset around the requested page? You could use the javascript similar to the one in the source of the top menu to load several frames at once. You'd place the code into the source of that quote page and use the url of this page as the one that'd go into the main window and use whatever other pages for other two default frames. If that's what you're looking for let me know and I may write you the code for that, if not then please clarify what steps you actually need done and I'll see if I can help you.

---
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
allynfolksjr
Administrator
avatar
Posted: 11 Aug 2004
21:26 GMT
Total Posts: 1892
I tried to make that clear, but I didn't have much time, and wasn't thinking to clearly. Sorry 'bout that.

Ok, my site is built around frames. And it's designed to be navigated using frames. But, right now, if you directly type in a webpage (like the quotes one), it just loads the page you requested, without the frames surrounding it.

Now what I would like to have happed, if possible, is learn how to make JavaScript, if thats the language I need to use, load the frameset around the pages that are directly typed in on a browser.

My concern is that if you request a page with that scripting on it, then it would load a frameset INSIDE the frameset, and that isn't good.

So, finally, after (hopefully) better explaining it. This is my question(s):

1. Is it possible to have a webpage detect if a frameset is surrounding it?
and if yes...
2. Can that page take the appropriate action if it detects that there isn't a frameset around it. The action being loading a frameset.

Again, thanks for any help you can provide.

[Edited by allynfolksjr on 12-Aug-04 06:26]
allynfolksjr
Administrator
avatar
Posted: 12 Aug 2004
10:23 GMT
Total Posts: 1892
Ok, took a look at the code for your forum.link stuff on the site, and it looks like I can make that work. I'll ask if I have any questions...
zkostik
Carrier
avatar
Posted: 12 Aug 2004
10:28 GMT
Total Posts: 2486
Oh that, you just have to specify a target frame. In your frameset (main page) you can give each frame a name. Whenever you want to load smething into a frame you can add the following parameter to the A HREF tag: target="FRAME_NAME"
this will show the page that link referred to in that frame. if you want to show the page in the same frame, then just write target="_self". As with frameset mumbo jumbo, I'd say yet but you'd have to do some JavaScript work. Frames in JS reside inside an object, so each frame should probably have a reference to its parent frameset or something similar to that. I haven't really played with that so I'm not 100% sure if that's possible and whether or not it'll work. Btw, the script should be on the page that has the frameset, it's easier to use it that way. You can access things in other frames but you'll have to figure out which frame has which ID (if you want your code to work in other browsers than IE) and go to parent/child frames and such. Search google and I'm sure you'll find some tutorials for that. If you get stuck I'll see if I can help you out.

---
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
allynfolksjr
Administrator
avatar
Posted: 12 Aug 2004
10:39 GMT
Total Posts: 1892
Ah, I think I foudn a tutorial, I'm try using it when I get back...





Portal | My Account | Register | Lost Password or Username | TOS | Disclaimer | Help | Site Search | File Archives Copyright © 2002-2019 CalcG.org