Jump to content


Frame link


4 replies to this topic

#1 Danny

    Young Padawan

  • Members
  • Pip
  • 262 posts
  • Location:London
  • Interests:web design

Posted 28 June 2006 - 05:44 AM

Hello, i want to have my links open in a non exsistant frame, by that i mean the frame doesnt exsist on that page.


So like for links exiting my site, i want a frame to apear at the top of the pages about 19 pixels in height where i can put my lookingsharp.co.uk back to link.


any ideas how?

i know i havent explained it well but i can't find live examples. <3

#2 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 28 June 2006 - 12:29 PM

Pass the url of the new page to a php script that will echo out the frameset containing the link that you want to go to.
<a href="/frameset.php?link=http://google.com">google</a>
<html>
<head>
<title>frameset</title>
</head>

<frameset rows="19,*">
	<frame src="/top.html">
	<frame src="<? echo $_GET['link']; ?>">
</frameset>
</html>
Of course, if you plan to put tutorials in the bottom frame, it would be more secure to pass an id rather than the exact link, and then select the link out of a database. But you get the general idea.

p.s. you can also use: <?=$_GET['link']; ?> to echo the link, but since it's an optional feature, i used echo() in the example.

Edited by rc69, 28 June 2006 - 12:30 PM.


#3 Danny

    Young Padawan

  • Members
  • Pip
  • 262 posts
  • Location:London
  • Interests:web design

Posted 29 June 2006 - 05:13 AM

Hello,


Thank you very much ill give it bash.


Edit: It works fantasticaly my ownly issue is that the Url is now extremely long is there a way to cut it down? like if possible link it to another php document that contains a list of links with assigned ids.


So instead of:

Quote


It would be something like this:

Quote

or

Quote



Is that possible?

Edited by Danny, 29 June 2006 - 06:01 AM.


#4 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 29 June 2006 - 12:15 PM

Anything is possible. Like i said in my last post, you could use a database to do it, which i think would be the most efficient way. You could also use a file to match every thing up, and to save you from right a long parsing script, you could use parse_ini_file()

#5 Danny

    Young Padawan

  • Members
  • Pip
  • 262 posts
  • Location:London
  • Interests:web design

Posted 29 June 2006 - 04:38 PM

Heh thank you for your help :D but it goes right over me ill give it a o on the weekend, the database sounds like its probably more secure i might request it in one of the other topics here.

Thank you very much none the less, youve been a great help. :P





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users