Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.