leeutalkin2me Posted April 16, 2006 Share Posted April 16, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/7568-opening-links-and-divs/ Share on other sites More sharing options...
ToonMariner Posted April 17, 2006 Share Posted April 17, 2006 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.. Quote Link to comment https://forums.phpfreaks.com/topic/7568-opening-links-and-divs/#findComment-27585 Share on other sites More sharing options...
wildteen88 Posted April 17, 2006 Share Posted April 17, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/7568-opening-links-and-divs/#findComment-27635 Share on other sites More sharing options...
leeutalkin2me Posted April 17, 2006 Author Share Posted April 17, 2006 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 iframe2But 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? Quote Link to comment https://forums.phpfreaks.com/topic/7568-opening-links-and-divs/#findComment-27655 Share on other sites More sharing options...
leeutalkin2me Posted April 17, 2006 Author Share Posted April 17, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/7568-opening-links-and-divs/#findComment-27665 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.