Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 05-24-2004, 05:45 AM   #1 (permalink)
Duncan
Registered User
 
Duncan's Avatar
 
Join Date: May 2004
Posts: 4
Duncan is on a distinguished road
Question Linking to specific frames in a frameset

Hi guys, I have a site in which I am using framesets so that I only need to update one page for contents instead of many copies. This works fine from within the site. However, I can't figure out how to give someone a link to a specific page and have that show up within the frameset as I designed it.

How can I link someone to a specific file and have it show up within a given frameset?

Site is www.nmhf.org

Duncan
Duncan is offline   Reply With Quote
Old 05-24-2004, 06:21 AM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,532
sde is on a distinguished road
this is one reason why you don't see that many framed sites anymore.

it might be time to learn a little php =) you can solve your problem with this tutorial:

http://codenewbie.com/tutorials/726.html
__________________
Mike
sde is offline   Reply With Quote
Old 05-24-2004, 06:54 AM   #3 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,726
redhead is on a distinguished road
This is what I ended up doing once I tried to solve this specific problem without access to PHP.

write a deciding function i javascript to enterpret the URL and find the page given after the '?' in the URL ie: www.domain.com?mypage
Have it do the following:
1) isolate the "mypage" from the URL
2) write the entire <frame ...> definition and put the "mypage" instead of the normal src for the main part.
So in your frameset page, you have a call to this javascript function instead of having a static frameset.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 05-24-2004, 10:36 AM   #4 (permalink)
Duncan
Registered User
 
Duncan's Avatar
 
Join Date: May 2004
Posts: 4
Duncan is on a distinguished road
Man, I don't know what php is, but the include code is pretty slick. I'll work with it tonight. So, what I would do is to make all pages with the repeating header and side navigation panes, and then use the include tag to lock and direct their hyperlinks?

What about "shared borders"? Is this another way around it?

Duncan
Duncan is offline   Reply With Quote
Old 05-24-2004, 10:41 AM   #5 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,532
sde is on a distinguished road
yeap, that's about it. does your web host support PHP? most do now a days.

if you run into trouble implementing it, post in the php forum.

php is pretty cool. you can browse around the other php tutorials to get an idea of things it can do.
__________________
Mike
sde is offline   Reply With Quote
Old 05-24-2004, 11:10 AM   #6 (permalink)
Duncan
Registered User
 
Duncan's Avatar
 
Join Date: May 2004
Posts: 4
Duncan is on a distinguished road
Thanks, Stan. I'll keep you posted. in the meantime, I need to redesign my site without frames.

Duncan
Duncan is offline   Reply With Quote
Old 05-24-2004, 10:32 PM   #7 (permalink)
Epsilon
Regular Contributor
 
Epsilon's Avatar
 
Join Date: Mar 2003
Location: Las Vegas, NV
Posts: 131
Epsilon is on a distinguished road
Frames generally suck and are way overused. There are very few cases where framed sites actually made good use of their frames.

An exception could be the inline frame (or <IFRAME> in HTML). The inline frame is actually pretty useful.

The difference is standard frames are generaly used simply to keep the navigation links at the top, or the left, or wherever. An inline frame can use your regular site template, but the content (which can be dynamic) appears within the area you have defined for the frame.

I've used it a lot. Look up 'iframe' on Google to find out more.
__________________
--Epsilon--
Epsilon is offline   Reply With Quote
Old 05-25-2004, 03:02 AM   #8 (permalink)
Duncan
Registered User
 
Duncan's Avatar
 
Join Date: May 2004
Posts: 4
Duncan is on a distinguished road
Epsilon,

It's hard to believe that if one wants to change the navigation or header panes that they have to go through all the pages in the site instead of just working on one template, but I suppose that's the way it is. I have seen iframe and it does look pretty slick.

So, like I said, I suppose I need to make up a page template and then copy it with different content for the whole site, Right?

Duncan
Duncan is offline   Reply With Quote
Old 05-25-2004, 10:15 AM   #9 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,532
sde is on a distinguished road
try php

once you see how it works, you'll never look back.
__________________
Mike
sde is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 02:46 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC8 ©2007, Crawlability, Inc.





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting