468,170 Members | 2,168 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,170 developers. It's quick & easy.

How to set link target property to open page in center div?

I have a page with three divs (top, left and center). I want to place
hyperlinks in the left column (div), where each link calls a separate page.
I want each separate page to open in the center div, leaving the contents of
the other two divs unchanged. But I don't know how to set the "target"
property to open in the center div. I would prefer to do this without using
frames.

Does anybody know how to set the "target" property of each hyperlink to show
the contents of each separate page in the center div? Thanks for any help.


Jul 21 '05 #1
3 23616
Jennifer wrote:
I have a page with three divs (top, left and center). I want to place
hyperlinks in the left column (div), where each link calls a separate
page. I want each separate page to open in the center div, leaving the
contents of the other two divs unchanged. But I don't know how to set the
"target" property to open in the center div. I would prefer to do this
without using frames.


Documents can only be displayed in windows or frames. You can't open a
document in joe random element. If you could, then there wouldn't be much
point in avoiding frames - since you would have just reintroduced all the
problems associated with them.

The solution is to include the content you have in the top and left divs on
each page. A preprocessor or server side tool can keep this sort of thing
in sync for you automatically.

http://www.allmyfaqs.com/faq.pl?Incl...ile_in_another
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 21 '05 #2
If you don't use frames you cann still use IFRAME for the same purpose.
Adressing of iframe source is : document.all.MyFrame.src="blabla.htm"

Jul 21 '05 #3
stofi wrote:

Are you responding to something? You seem to have forgotten to quote any of
it.
If you don't use frames you cann still use IFRAME for the same purpose.
Adressing of iframe source is : document.all.MyFrame.src="blabla.htm"


Yuck. That is Internet Explorer specific JScript, don't use it. If you MUST
use JavaScript then try: document.frames['MyFrame'].src, which is much
better supported, but you almost certainly can get away with just using the
target attribute and plain old Transitional HTML 4.01.

See also: http://www.allmyfaqs.com/faq.pl?Prob...h_using_frames

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Marco | last post: by
36 posts views Thread by randau | last post: by
4 posts views Thread by Miguel Dias Moura | last post: by
3 posts views Thread by jeddiki | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.