PDA

View Full Version : linking


sedah
07-13-2009, 05:10 PM
is there a possible way to open a link inside a div on the same page?

for ex: lets say "contact us" link is on div 1, and would like tht to open up in div 2 which is called "contact fo" but on the same page.

thanks in advance, may be confusing:mrgreen:

bee80
07-13-2009, 05:36 PM
maybe there is a way to do this with javascript, if not frames are your answer but many ppl tell me there out dated

Corrosive
07-13-2009, 05:49 PM
maybe there is a way to do this with javascript, if not frames are your answer but many ppl tell me there out dated

An iframe may be a good option.

sedah
07-13-2009, 09:02 PM
An iframe may be a good option.

okay I tried that out, so lets say link1 is already inside that iframe, and i wanna click on link2 and want that to open up into that iframe and replace link1, is that possible?

Corrosive
07-13-2009, 09:13 PM
okay I tried that out, so lets say link1 is already inside that iframe, and i wanna click on link2 and want that to open up into that iframe and replace link1, is that possible?

If I am thinking along the right lines from your description then, yes. I'll try and explain.

Think of an iframe as a window in your page. If you reach through that window and click a link then that link will open in the same place. It is like viewing a website within website. Not sure if that makes sense and it is a really bizarre way to build a website. I think I'd need a very good reason to attempt it!

sedah
07-14-2009, 06:06 AM
If I am thinking along the right lines from your description then, yes. I'll try and explain.

Think of an iframe as a window in your page. If you reach through that window and click a link then that link will open in the same place. It is like viewing a website within website. Not sure if that makes sense and it is a really bizarre way to build a website. I think I'd need a very good reason to attempt it!

yea pretty much figured that it would do that, sorry i didnt give a more description of my question.

what im tryin to figure out is, lets say I click a link on div1 and it opens up in div2 which has the iframe inside. then i click another link on div1 and it opens up in the inframe inside div2 replacing the previous link i opened....is it clearer now? hehe sry if its confusing question.

domedia
07-14-2009, 01:20 PM
Why not just make regular web pages?

MagicPower
07-15-2009, 10:45 PM
Are you tryng to achieve something like this (http://www.oed4u.com/golfing/). click on HOME and ABOUT US links.

Corrosive
07-16-2009, 06:03 AM
Are you tryng to achieve something like this (http://www.oed4u.com/golfing/). click on HOME and ABOUT US links.

That's good, uses the show/hide layers behaviour in dreamweaver. Still not sure why these wouldn't just be separate pages though. If you do a Google Search it will read the content of a hidden div but the information wanted by the user won't appear on the page first up. Might get confusing for viewers.

coloeagle
07-16-2009, 07:52 AM
You could start by giving the iframe a name such as "news".

<iframe name="news" style="width:300px; height:300px;">Alt text for initial display if needed</iframe>
Then in your links you will use the "target" attribute using this name.

<a href="todays-news.html" target="news">Today's news</a>

MagicPower
07-16-2009, 01:15 PM
If you do a Google Search it will read the content of a hidden div but the information wanted by the user won't appear on the page first up. Might get confusing for viewers. .
True, its best to stick with normal paging coz its easier quicker n less advanced when it comes to linking.

sedah
07-19-2009, 05:27 PM
Are you tryng to achieve something like this (http://www.oed4u.com/golfing/). click on HOME and ABOUT US links.


yea, dats what I was tryin to do

sedah
07-19-2009, 05:27 PM
You could start by giving the iframe a name such as "news".

<iframe name="news" style="width:300px; height:300px;">Alt text for initial display if needed</iframe>
Then in your links you will use the "target" attribute using this name.

<a href="todays-news.html" target="news">Today's news</a>


about to try this out and see how it goes

MagicPower
07-19-2009, 11:28 PM
yea, dats what I was tryin to do.
i used behaviours (show/hide elements) but there are downsides that are search related.

sedah
07-23-2009, 07:44 PM
i used behaviours (show/hide elements) but there are downsides that are search related.

how do i go about doin that? and by downsides search related? what do u mean exactly hhe

MagicPower
07-27-2009, 01:39 PM
create div 1 fill it with content, set its positioning visibility to hidden. duplicate it and call it div2 or whatever. set div 2 exactly in the same position as div1. to link. lets say you want

Home to link to div1
About to link to div2

Highlight Home then go to Window > Behaviours
Add behaviour > Show-Hide Elements
Scroll down to div1 and click on show.
so when Home link is clicked it will show div1, whose visibility is hidden in Positioning.

Do the same for About link but this time you have to add a second behaviour to it so that when About link is clicked div1 has to be hidden.

Regarding the downside of Search Engines Corossive said
If you do a Google Search it will read the content of a hidden div but the information wanted by the user won't appear on the page first up. Might get confusing for viewers.

voicecrafters
07-27-2009, 02:21 PM
is there a possible way to open a link inside a div on the same page?

for ex: lets say "contact us" link is on div 1, and would like tht to open up in div 2 which is called "contact fo" but on the same page.

thanks in advance, may be confusing:mrgreen:
you can try to use the behaviors effects