No frames to frames

Maybe this is too simple or maybe it can't be done. I have a no frames home page with links A,B,C. I want to open this links in a frame page that will have a header frame with the same links and a content frame. I want link A to open the frame page with page A in the content frame, link B to open page B, etc. Thank you
clauAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

andrivCommented:
The links should be like this from the main page.

<A HREF="frame.html?A.htm">A</A>
<A HREF="frame.html?B.htm">B</A>
<A HREF="frame.html?C.htm">A</A>

Create a blank page and name it blank.html
Create the navigation html (nav.html)
then Create the frame page like this:

<html>
<head>
<Title>ABC</title>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
 <!--
 function loadmain() {
 var strURL = window.location.search;
if (strURL) {
 strURL = strURL.substring(1,strURL.length);
 window.frames['main'].location = strURL;
 }
 }
//-->
</SCRIPT>
</head>
      <frameset rows="120,*" frameborder="0" border="no" framespacing="0" noresize scrolling="no" marinwidth="0">
            <frame src="nav.html" name="top" scrolling="no" NORESIZE>
                                 <FRAME SRC="blank.html" NAME="main" FRAMEBORDER="1" SCROLLING="Auto">
      </frameset>
<NOFRAMES><BODY>

                      Your browser needs frame support!

                      </BODY></NOFRAMES>
</html>
0
clauAuthor Commented:
Sorry andriv, it didn´t work.
Let´s see if I got it right:
I created a page called "abc.htm" where I put the code. I created "blank.html", "nav.html" with links to A, B, C.
 Then I created "princ.htm" where I wrote:
<a HREF="abc.htm?A.htm">A</a> <a HREF="abc.htm?B.htm">B</a> <a HREF="abc.htm?C.htm">C</a>
The¨"abc.htm" works well alone, but when called from "princ" it displays "blank.htm"
0
andrivCommented:
Almost, you must create the frame. My example below the frame is called frame.html

<html>
<head>
<Title>DBT Local Directory</title>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
 <!--
 function loadmain() {
 var strURL = window.location.search;
if (strURL) {
 strURL = strURL.substring(1,strURL.length);
 window.frames['main'].location = strURL;
 }
 }
//-->
</SCRIPT>
</head>
      <frameset rows="120,*" frameborder="0" border="no" framespacing="0" noresize scrolling="no" marinwidth="0">
            <frame src="logo.html" name="top" scrolling="no" NORESIZE>
                                 <FRAME SRC="blank.html" NAME="main" FRAMEBORDER="1" SCROLLING="Auto">
      </frameset>
<NOFRAMES><BODY>

                      Your browser needs frame support!

                      </BODY></NOFRAMES>
</html


 then the <a href> tag from the main page should be directed to the frame followed by a ? followed by the page you wish the main to be. (the bottom frame)

<a HREF="frame.htm?abc.htm">A</a>

the above link, if on your main page would first open the frame page and put the abc.htm in the bottom frame where the frame directs it to be.
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

clauAuthor Commented:
No, it doesn´t work. Shouldn´t I call the function from anywhere within the document?
0
andrivCommented:
Why don't you past the exact code for each page with the name for each so I can take a look at it.  I use the exact code for one of my sites.  (www.dbt-local.com).
0
clauAuthor Commented:
Thanks for your help!
I´ve entered your site and I see it works allright there.
I´ve put my code in
http://www.clic.com.ar/pruebas
Will you take a look at it?
Thanks again!
0
andrivCommented:
There is more then one thing wrong.  On your ahref tags you have frame.html?A.htm.  The web is case sensative so since your page is named a.htm you would have to write is a such.
<ahref="frame.html?a.htm> and the same for the other two.

The other problem is in your frame.html.  I can not view it from the browser so you have to copy and paste it here so I can take a look.
0
andrivCommented:
Ok, I see your frame script.  I did not know I was able to veiw throught the browser.  I believe your problem is you closed the body before the noframe. It should be:

</noframe>
</body>

You have it the oppisite.
0
andrivCommented:
No the code you have is correct. The only differance between yours and mine is the order of the frame attributes try writting it in the exact order as mine as see if it makes a differance.

<frameset rows="120,*" frameborder="0" border="no" framespacing="0" noresize scrolling="no" marinwidth="0">
<frame src="logo.html" name="top" scrolling="no" NORESIZE>
<FRAME SRC="blank.html" NAME="main" FRAMEBORDER="1" SCROLLING="Auto">
0
andrivCommented:
Finally!!! I found Your problem on the blank.html the body tag should look like this.

<BODY onLoad="parent.loadmain()">
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
clauAuthor Commented:
Great!!! I ONLY had to change it and it worked
Tons of thanks again!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.