Jump to content

opening links and Divs


leeutalkin2me

Recommended Posts

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
Link to comment
https://forums.phpfreaks.com/topic/7568-opening-links-and-divs/
Share on other sites

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..
Link to comment
https://forums.phpfreaks.com/topic/7568-opening-links-and-divs/#findComment-27585
Share on other sites

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.
Link to comment
https://forums.phpfreaks.com/topic/7568-opening-links-and-divs/#findComment-27635
Share on other sites

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?
Link to comment
https://forums.phpfreaks.com/topic/7568-opening-links-and-divs/#findComment-27655
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/7568-opening-links-and-divs/#findComment-27665
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.