Click to See Complete Forum and Search --> : page and frame code


plucker
06-26-2003, 11:19 PM
Hi all
i recently started making a website for my dad's small bussiness and i have a question about it. I have a link on "page 1" and it links to another page with two frames called nav and main. Both frames have a page as its default src, but i need to chang the main src. How do you get the link to open up a page in the same window but change the source of "main".
All help will be appreciated

hastx
06-26-2003, 11:37 PM
put a Target attribute within the link:

target="main"

hastx
06-26-2003, 11:48 PM
...wait a minute, i just read it again.
Can you post a link?

You have page1. then a link opens a frameset page. but you want to change the source of the "main" frame. to something else? This would be done by changing the source of the main frame within the frameset page code.

plucker
06-27-2003, 12:24 AM
I'm sorry but i dont understand what ur saying
i'll giv you more info

Current page: index.htm contains three frames 1,top 2,News and 3,main.
Link:Downloads. in the top frame. needs to target the main frame src to products/presenter/presenter.htm and change the src of a frame in that page.
presenter.htm: has two frames a nav frame and a main frame. current src for the main frame in that page is default.htm it needs to be changed into downloads.htm.

i'm confusing myself.lol
thanks for trying

hastx
06-27-2003, 07:59 AM
Still not sure I'm getting it.

1.You have a page with 3 frames...got that.

2.When you click on a link in the top frame, you want it to target the main frame...Got that.

...This is the wierd part. Do you want presenter.htm (which contains another 2 frames) to load into the main frame of the index frameset?

First things first. Maybe this will help. Here is a 3 frame code similar to what you are talking about, i think.

<frameset rows="100,*" >
<frame src="top.html" name="top">
<frameset cols="175,*" border="0">
<frame src="sidebar.html" name="side">
<frame src="indexmain.html" name="main" >
</frameset>
</frameset>

If you want to change which pages load into the frames when the frameset is opened, just specify that page in src attribute... src="whateverpage.html" .

Now, as far targeting the frames once the frameset is loaded, this needs to be done within the individual links, or in the head of the actual html document. For example, Whatever page loads into the top frame, you can insert this code into the <head> section of the document:

<base target="main">

This will target ALL links in that document to open in the main frame.

plucker
06-27-2003, 08:31 PM
Yes thats all right, but its not what i'm looking for. i can target the main fame with presenter.htm but i also need to target the body frame within presenter.htm. After all this has happend i should have 5 frames.
Top - original page
Side - original page
Main - original page (Where presenter.htm loads)
Body - Presenter.htm (Where Downloads.htm loads)
Nav - Presenter.htm

Hope this helped thanks

Aronya1
06-30-2003, 11:50 AM
Originally posted by plucker
Link:Downloads. in the top frame. needs to target the main frame src to products/presenter/presenter.htm and change the src of a frame in that page.
The link will not change the source code of your frame.

presenter.htm: has two frames a nav frame and a main frame. current src for the main frame in that page is default.htm it needs to be changed into downloads.htm.

presenter.htm has(is?) a frameset. The source pages for that frameset are defined in the code of that frameset.
You should see something like: <frame src="default.htm" name="mainFrame">
Change it to <frame src="downloads.htm" name="mainFrame">

plucker
07-02-2003, 07:45 PM
i dont need src changed for main permenately, just for that link.
and yes presenter.htm is a frameset
cheers