Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

specify documents when opening frame page

Status
Not open for further replies.

paulorlowski

Programmer
Jul 10, 2001
56
0
0
US
From the navigation link on my index.htm page, I want to load a framed page and specify the corresponding document that should load into the menu frame and data frame.

For example, on the index.htm I have 3 links: rocks, paper, scissors.

If I click rocks, I want the framespage.htm to open and the data frame in it to display rocks.htm and the menu frame to display a submenu page submenu.htm. Similarly if I'm on the index page and click "paper", I want the frameset.htm to open and display paper.htm in the data frame.

I think the link on the index page should start like this
<a href=&quot;framespage.htm?menu=submenu.htm@data=rocks.htm&quot;>, but I'm not sure where to go with it.

Anyone have a clue?

Thanks,
Paul







 
hi Paul,

I made something similar for thread216-330835

you can do something like this for the frameset:

[tt]
<html>
<head>
<title>frameset</title>

<script language=&quot;javascript&quot;>
var sFrame = location.search.split(&quot;=&quot;)[1];
var sHTML = '<frameset cols=&quot;25%,*&quot;>' +
'<frame name=&quot;left&quot; src=&quot;submenu.html&quot;>' +
'<frame name=&quot;right&quot; src=&quot;' + sFrame + '&quot;' +
'</frameset>';

document.write(sHTML);
</script>

</head>
</html>
[/tt]


from your index page, your links will look like:

<a href=&quot;frameset.html?frame=rock.html&quot;>rock</a>
<a href=&quot;frameset.html?frame=paper.html&quot;>paper</a>
<a href=&quot;frameset.html?frame=scissors.html&quot;>scissors</a>

this will open the menu page on the left, and whatever page is passed as &quot;frame=&quot; on the right.

=========================================================
if (!succeed) try();
-jeff
 
Excellent. That worked and it was exactly what I needed. I appreciate it!

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top