Linking to specific page with surrounding frames

Hi, I have a website designed in frontpage 2003 using frames.

I want to be able to send someone a link to a certain page that is displayed in the main frame in the website but instead of it just showing that page on its own in the browser, I want it to show the surround ing frames aswell, so that they can navigate using the buttons in the header and side frames.

Here is the site:

www.infomedltd.co.uk

say for example I want to show them this page: - how do I get the other frames to show aswell when I send the link?

http://www.infomedltd.co.uk/events.htm

Any ideas how I would achieve this?
LVL 4
JackIT ManagerAsked:
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.

James RodgersWeb Applications DeveloperCommented:
pass the link as

www.infomedltd.co.uk?events.htm

and tehn parse it out for processing, are you using straight html or do you have server side processing also?

JackIT ManagerAuthor Commented:
The link you posted just takes me to the homepage.

I am not sure what you mean with: and then parse it out for processing....?

Also I think its just straight html, server side processing...? lol you can see where we are going here - not an experienced web designer - I can use FrontPage, thats about it.

Cheers
Jack
James RodgersWeb Applications DeveloperCommented:
add this to teh frames page

<script>
if (window.location.href.indexOf('?') != -1)
      var c=window.location.href.split('?');
      document.frames['frameName'].src=c[1];

</script>

where frame name is teh id or name of teh frame you want to have the page displayed in

this is js and requires a js enabled browser
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

James RodgersWeb Applications DeveloperCommented:
sorry should be

<script>
if (window.location.href.indexOf('?') != -1)
     var c=window.location.href.split('?');
     window.frames['frameName'].src=c[1];

</script>
JackIT ManagerAuthor Commented:
Do I add it to the index.html ? if so where abouts? Here is the code from the index.html


---------------------------------------

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Infomed Research &amp; Training Limited</title>
</head>

<frameset framespacing="0" border="0" frameborder="0" rows="132,*">
      <frame name="banner" scrolling="no" noresize target="contents" src="banner.htm">
      <frameset cols="150,*">
            <frame name="side" target="main" src="side.htm" scrolling="auto" noresize>
            <frameset rows="*,11%">
            <frame name="main" src="main.htm" scrolling="auto" marginwidth="5" target="_self">
                  <frame name="main1" src="footer.htm" scrolling="no" noresize target="_self">
            </frameset>
      </frameset>
      <noframes>
      <body>

      <p>This page uses frames, but your browser doesn't support them.</p>

      </body>
      </noframes>
</frameset>

</html>
James RodgersWeb Applications DeveloperCommented:
ok try this

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Infomed Research &amp; Training Limited</title>
</head>

<frameset framespacing="0" border="0" frameborder="0" rows="132,*">
     <frame name="banner" scrolling="no" noresize target="contents" src="banner.htm">
     <frameset cols="150,*">
          <frame name="side" target="main" src="side.htm" scrolling="auto" noresize>
          <frameset rows="*,11%" onLoad="if (location.search) top.main1.location=location.search.substring(1)+'.html'">
          <frame name="main" src="main.htm" scrolling="auto" marginwidth="5" target="_self">
               <frame name="main1" src="javascript:' '" scrolling="no" noresize target="_self">
          </frameset>
     </frameset>
     <noframes>
     <body>

     <p>This page uses frames, but your browser doesn't support them.</p>

     </body>
     </noframes>
</frameset>

</html>
JackIT ManagerAuthor Commented:
Still shows no frames, have a look:

http://www.infomedltd.co.uk/events.htm
James RodgersWeb Applications DeveloperCommented:
change to this

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Infomed Research &amp; Training Limited</title>
</head>

<frameset framespacing="0" border="0" frameborder="0" rows="132,*">
     <frame name="banner" scrolling="no" noresize target="contents" src="banner.htm">
     <frameset cols="150,*">
          <frame name="side" target="main" src="side.htm" scrolling="auto" noresize>
          <frameset rows="*,11%" onLoad="if (location.search) top.main1.location=location.search.substring(1)+'.htm'">
          <frame name="main" src="main.htm" scrolling="auto" marginwidth="5" target="_self">
               <frame name="main1" src="javascript:' '" scrolling="no" noresize target="_self">
          </frameset>
     </frameset>
     <noframes>
     <body>

     <p>This page uses frames, but your browser doesn't support them.</p>

     </body>
     </noframes>
</frameset>

</html>

and pass the link as

http://www.infomedltd.co.uk?events

thats if all pages have .htm extensions, if you have some .html extensions then i will need to alter it some more
JackIT ManagerAuthor Commented:
ok, I changed it, as before, the link is taking me to the home page.

Th index page where i am changing the code is index.html, all other pages are .htm

Also my footer frame has gone missing :~/
JackIT ManagerAuthor Commented:
in "Design View" of FrontPage, where my footer should be it says, "Could not open page javascript"
James RodgersWeb Applications DeveloperCommented:
ok .... this should fix the missing footer

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Infomed Research &amp; Training Limited</title>
</head>

<frameset framespacing="0" border="0" frameborder="0" rows="132,*">
     <frame name="banner" scrolling="no" noresize target="contents" src="banner.htm">
     <frameset cols="150,*">
          <frame name="side" target="main" src="side.htm" scrolling="auto" noresize>
          <frameset rows="*,11%" onLoad="if (location.search) {top.main.location=location.search.substring(1)+'.htm'}else{top.main.location='main.htm'}">
          <frame name="main" src="javascript:' '" scrolling="auto" marginwidth="5" target="_self">
               <frame name="main1" src="footer.htm" scrolling="no" noresize target="_self">
          </frameset>
     </frameset>
     <noframes>
     <body>

     <p>This page uses frames, but your browser doesn't support them.</p>

     </body>
     </noframes>
</frameset>

</html>

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
JackIT ManagerAuthor Commented:
Brilliant! that works perfect, so I just need to change the first \ to a ? and loose the .htm and its fine.

Great, thanks very much for your help!

I am going to attempt this with my personal website tonight - expect I might be back in this thread, lol

Jack :)
James RodgersWeb Applications DeveloperCommented:
>>Brilliant! that works perfect, so I just need to change the first \ to a ?
this works
http://www.infomedltd.co.uk?events
so does this
http://www.infomedltd.co.uk/?events

>>and loose the .htm and its fine
the code can be changed  so that  http://www.infomedltd.co.uk?events.htm can work
just change
<frameset rows="*,11%" onLoad="if (location.search) {top.main.location=location.search.substring(1)+'.htm'}else{top.main.location='main.htm'}">

to
<frameset rows="*,11%" onLoad="if (location.search) {top.main.location=location.search.substring(1)}else{top.main.location='main.htm'}">


the original code was by mplungjan, i just made some modifications

glad i could help

thanks for the points
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
Web Development Software

From novice to tech pro — start learning today.