Jump to content


Photo

How can I make a link target to a div?


  • Please log in to reply
5 replies to this topic

#1 Matheus

Matheus

    P2L Jedi Master

  • Members
  • PipPipPipPip
  • 1,058 posts
  • Gender:Not Telling

Posted 09 May 2006 - 12:20 PM

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

#2 ericrcan

ericrcan

    Young Padawan

  • Members
  • Pip
  • 103 posts

Posted 09 May 2006 - 12:32 PM

You could use PHP for this.

http://www.stealthde.../pagenavigation

#3 coolaid

coolaid

    P2L Jedi Master

  • Members
  • PipPipPipPip
  • 1,435 posts
  • Gender:Male
  • Interests:i wonder..

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 Matheus

Matheus

    P2L Jedi Master

  • Members
  • PipPipPipPip
  • 1,058 posts
  • Gender:Not Telling

Posted 09 May 2006 - 01:31 PM

You could use PHP for this.

http://www.stealthde.../pagenavigation


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 content

but i didn't understand this:

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


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 B)
thanks anyway guys

#5 coolaid

coolaid

    P2L Jedi Master

  • Members
  • PipPipPipPip
  • 1,435 posts
  • Gender:Male
  • Interests:i wonder..

Posted 09 May 2006 - 02:05 PM

do this:

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 Futingkiller

Futingkiller

    Young Padawan

  • Members
  • Pip
  • 110 posts

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users