I decided to leave iFrames and use divs + CSS.
BUT, I can't figure out how target a link to the content div.
Thank you
How can I make a link target to a div?
Started by Matheus, May 09 2006 12:20 PM
5 replies to this topic
#1
Posted 09 May 2006 - 12:20 PM
#2
Posted 09 May 2006 - 12:32 PM
#3
Posted 09 May 2006 - 12:42 PM
plain and simple, you cant target a div. you need to use php includes with seperate pages (pagination..)
#4
Posted 09 May 2006 - 01:31 PM
zYpher, on May 9 2006, 05:31 PM, said:
in the tuto they show me to put this code:
<?php
if (! file_exists("$page.php"))
{
include("updates.php");
}
else
{
include("$page.php");
}
?>
into the contentbut i didn't understand this:
Quote
so. this code should go where you would like the content of link.php to go, in your main php file.
after you have correfctly done everything, if you get a '404' updates.php will show up by default, although you can change this.you do not have to have a file named page.php.
in the page which will be included, all of everything from the main php file will also be included there. EG - font tags.
then just rename your links to (yourfile).php?page=whatever
after you have correfctly done everything, if you get a '404' updates.php will show up by default, although you can change this.you do not have to have a file named page.php.
in the page which will be included, all of everything from the main php file will also be included there. EG - font tags.
then just rename your links to (yourfile).php?page=whatever
I have to use a PHP file istead of a HTML?
And the links? "then just rename your links to (yourfile).php?page=whatever I put the page name in the "yourfile" ? what about that "whatever"?
If anyone know a tuto for a beginner like me, please tell me where I can find
thanks anyway guys
#5
Posted 09 May 2006 - 02:05 PM
do this:
create file: top.php:
create file bottom.php:
create file index.php:
create fake.php:
its that simple, if you dont get it by know.. well.... hmm..
create file: top.php:
<html> <head> </head> <body> <a href="index.php">Home</a> . <a href="fake.php">Fake</a><br />
create file bottom.php:
</body> </html>
create file index.php:
<? include("top.php"); ?>
Dummy content for the index.php page... blah blah blah
<? include("bottom.php"); ?>
create fake.php:
<? include("top.php"); ?>
fake.php page... blah blah blah
<? include("bottom.php"); ?>
upload onto a server, your computer won't show php correct.its that simple, if you dont get it by know.. well.... hmm..
#6
Posted 11 May 2006 - 08:50 AM
well it could be a way:
put everything in a table and change the content of a table with javascript
you make functions for changing that and you put onClick='function();' tag
learn more here :
http://www.w3schools..._examples_3.asp at Table object
put everything in a table and change the content of a table with javascript
you make functions for changing that and you put onClick='function();' tag
learn more here :
http://www.w3schools..._examples_3.asp at Table object
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
