Jump to content


Photo

opening links and Divs


  • Please log in to reply
4 replies to this topic

#1 leeutalkin2me

leeutalkin2me
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 16 April 2006 - 11:22 PM

I am creating my Homepage structure using Divs & Css coding.

The page will include Menus & Links.

When a Link is selected, how can I make the Page to be opened, open up in one of the other Divs?

The menu is created with php however not attached to this page as yet. I need to work out how to do the styling of the Menu. Iwant to keep the original homepage open and allow pages to opened up in the center Div

<div id="content">

[a href=\"http://www.troublefreetraveladvisor.com/website3.html\" target=\"_blank\"]http://www.troublefreetraveladvisor.com/website3.html[/a]

Lee

#2 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 17 April 2006 - 01:32 AM

What I think you want to do (change the div content without reloading the page) requires javascript. BUt why bother? just have your link point to a script with some vars passed in the url...

I avoid js if at all possible - i try to make my websites as accessible as possible since in the uk you can be prosecuted if visually impaired or blind people cannot access any services you tender on your site..
follow me on twitter @PHPsycho

#3 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 17 April 2006 - 08:19 AM

You'll want to look into AJAX if you want to do that sort of thing.

Have a look at [a href=\"http://www.ajaxfreaks.com/tutorials/1/0.php\" target=\"_blank\"]this[/a] tutorial and prehaps [a href=\"http://www.ajaxfreaks.com/tutorials/5/0.php\" target=\"_blank\"]this [/a] one too.

#4 leeutalkin2me

leeutalkin2me
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 17 April 2006 - 10:53 AM

Just looked at those tutorials and I frames.

Im totally confused.

I see that you create an Iframe, and then direct using the link for the page to open up in there

<a href="anchors.htm" target="iframe2">
anchor page opens in iframe2

But where does this leave me in relation to my Divs?
Do you give them an additional ID or class which means they can be recognised as a Div and also a Iframe, all in the same thing?

#5 leeutalkin2me

leeutalkin2me
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 17 April 2006 - 11:27 AM

well i played around and got this happening

[a href=\"http://www.troublefreetraveladvisor.com/website.php\" target=\"_blank\"]http://www.troublefreetraveladvisor.com/website.php[/a]

when u click on the About us Link, i got a page to open up in the Content Div which i assigned as an Iframe.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users