Jump to content

Archived

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

leeutalkin2me

opening links and Divs

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

Share this post


Link to post
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..

Share this post


Link to post
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.

Share this post


Link to post
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?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

×

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.