Framesets ?

D

dorayme

You are right , there is no strong reason for using a frameset. I could
do without them.

thanks..

No, I was wrong it seems... oops... "different" is just different
parts of one page in your meaning. I just looked at JL's post and
realised. Sorry. You want to link to different bits of a page on
the right. This is not hard.

Still, let me carry on nevertheless: it is still not quite clear
why this should make it inappropriate for frames. Frames might be
inappropriate but not for this reason. One of the great strengths
of frames is this: well supported way of getting the menu on the
left to not disappear as it so absurdly does most of the time and
we have all got used to it. (It almost beggars belief actually
that this has happened)
 
D

dorayme

Think i messed up my question. My apoligies. The right hand side has to
be a single html page which will show different html content depending
upon what has been clicked on the left hand side. The problem is that
all the html content has to be a single html page. So i imagine the
content would have to be hidden or unhidden depending upon what is
clicked on the left hand side. How can i do that -- that is hide and
unhide ?

thanks ..
vivekian

Now I understand your q better: to link to something in the
middle of a long page on the right side this should work
reasonably well:

<a href="rightHandDoc.html#middle" target="rightframe">click to
middle of page</a>

in the navigation.

In the html for the right, you would put

id="middle"

where you want the link to go to:

<h1 id="middle">A heading that is about the middle of the
page</h1>

This works well on my tests

(You can also use another construction but try this)
 
V

vivekaseeja

dorayme said:
Now I understand your q better: to link to something in the
middle of a long page on the right side this should work
reasonably well:

<a href="rightHandDoc.html#middle" target="rightframe">click to
middle of page</a>

in the navigation.

In the html for the right, you would put

id="middle"

where you want the link to go to:

<h1 id="middle">A heading that is about the middle of the
page</h1>

This works well on my tests

(You can also use another construction but try this)

Would want the content present within the h1 tag to remain hidden until
the corresponding link on the left side is clicked on. It should be
invisible.

thanks..
 
D

dorayme

dorayme wrote:

Would want the content present within the h1 tag to remain hidden until
the corresponding link on the left side is clicked on. It should be
invisible.

Whatever do you mean? There is no content in the <h1...> just as
there is no picture in <img src="pic.jpg">. The latter is just
text and acts as instruction to web browsers.
 
N

Neredbojias

To further the education of mankind, (e-mail address removed) vouchsafed:
Would like to stick to simple HTML and CSS. Dont want to use any server
side scripting at present. Named anchors sound like a good idea but how
do hide them and show them only when desired ? Is this possible through
DHTML ?

DHTML is not "simple HTML and CSS". I'm still not sure exactly what you
want to do, either. If it is to replace content as if in part of a page,
server-side is the way to go.
 
H

Harlan Messinger

dorayme said:
How did you conclude this from what the OP said? He used the word
"different"

From reading it. What part of "has to be a single html page" don't you
understand?
 
D

dorayme

Harlan Messinger said:
From reading it. What part of "has to be a single html page" don't you
understand?

Yes, I fully deserve this. Sorry, Harlan old boy... You seem to
have understood the OP on this straight away... OP is quite
surprising though in his follow questions?
 
J

jojo

What about using CSS to hide the parts of the right page which should
not be visible and using JavaScript to make them visible?

RIGHT FRAME:
<html>
<head>
<title>SomeTitle</title>
<style type="text/css">
#Content1{display:block}
#Content2{display:none}
#Content3{display:none}
</style>
<script type="text/javascript" language="javascript">
function showContent(n){
for (i=1; i<=3; i++){
document.getElementById("Content"+1).style.display="none"
}
document.getElementById("Content"+n).style.display="block"
}
</script>
</head>
<body>
<div id="Content1">Content 1</div>
<div id="Content2">Content 2</div>
<div id="Content3">Content 3</div>
</body>
</html>


Now a link in the left frame has to look like this (if right frame is
named "right"):

<a href="javascript:parent.right.showContent(1)>ShowContent1</a>
<a href="javascript:parent.right.showContent(2)>ShowContent2</a>
<a href="javascript:parent.right.showContent(3)>ShowContent3</a>

I think this should work, but I haven't tested yet.
 
D

Darin McGrew

jojo said:
What about using CSS to hide the parts of the right page which should
not be visible and using JavaScript to make them visible?

If you use JavaScript to make something visible, then you should use
JavaScript to hide it in the first place. Using CSS to hide it makes it
inaccessible to those with CSS enabled, but JavaScript
disabled/unavailable.
 
J

jojo

Darin said:
If you use JavaScript to make something visible, then you should use
JavaScript to hide it in the first place. Using CSS to hide it makes it
inaccessible to those with CSS enabled, but JavaScript
disabled/unavailable.

OK, you're right. Than replace the head-section in my last posting with
this:

<head>
<title>SomeTitle</title>
<script type="text/javascript" language="javascript">
function showContent(n){
for (i=1; i<=3; i++){
document.getElementById("Content"+1).style.display="none"
}
if (n) document.getElementById("Content"+n).style.display="block"
}
showContent()
</script>
</head>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top