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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling Pages

Status
Not open for further replies.

VisBasDude

Programmer
Nov 10, 2002
19
GB
In PHP is it possible to call another page or write one into another part of a frames pages. Ive looked all over and cant see anything. Does anyone have any ideas of how this could be done. Thanks in advance
 
I'm not sure what you mean by "call another page". PHP can open communications with a web or FTP server and include that server's output in its own. PHP can include the content of other files on it's own server's filesystem.

PHP is a server-side language. It does not get to choose where to write its output. Hoever, that output can include JavaScript code which can reference other frames. Want the best answers? Ask the best questions: TANSTAAFL!
 
Well if i have a login page and in one frame and then want to change the menu in another frame acording to the person that logs in, how would this be best done??
 
I'm not sure that what you are asking is primarily a PHP issue. Here is a quick example of frameset navigation. Copy and paste the 4 files and name as indicated and then launch f1.htm. Hope this helps.

CALL THIS f1.htm
<html><head><title>Frameset</title></head>
<frameset cols=&quot;200,*&quot; frameborder=0 border=0>
<frame src=&quot;c1.htm&quot; name=&quot;LEFT&quot; scrolling=&quot;no&quot;>
<frame src=&quot;c2.htm&quot; name=&quot;RIGHT&quot; scrolling=&quot;no&quot;>
</frameset></html>

NAME THIS c1.htm
<html><head><title>Column 1</title>
<style>body {color:black; background:silver}</style>
</head><body><div align=center>C1</div></body></html>

NAME THIS c2.htm
<html><head><title>Column 2</title>
<style>body {color:black; background:yellow}</style>
</head><body><div align=center>
C2<br /><br /><a href=&quot;c3.htm&quot; target=&quot;LEFT&quot;
onClick='window.self.location=&quot;c4.htm&quot;'>
CHANGE FRAMES</a>
</div></body></html>

NAME THIS c3.htm
<html><head><title>Column 3</title>
<style>body {color:black; background:blue}</style>
</head><body><div align=center>C3</div></body></html>

NAME THIS c4.htm
<html><head><title>Column 4</title>
<style>body {color:black; background:green}</style>
</head><body><div align=center>C4</div></body></html>

Clive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top