Can I show only a part of a page instead of the whole page?

admin

Administrator
Staff member
Hi,<br />
Is there a way I can show a particular part of a page, depending on the link used to load the page. Example:<br />
<br />
Menu page<br />
link 1<br />
link 2<br />
<br />
<br />
Contents page<br />
<br />
paragraph 1<br />
.<br />
.<br />
end of paragraph 1<br />
<br />
paragraph 2<br />
.<br />
.<br />
end of paragraph 2<br />
<br />
"Menu page" and "Contents page" are two separate pages.<br />
When someone clicks on link 1 in the Menu page, I want paragraph 1 in the Contents page to load, that is, I don't want to show the whole page.<br />
I tried using bookmarks, but although the correct paragraph is displayed, so is the rest of the page if you scroll up and down.<br />
<br />
And, yes, I know that I could split the file into several files, each containing the correct paragraphs.<br />
<br />
Server side scripting is not available.<br />
<br />
Thanks for help.<br />
<br />
Bj榇昻<!--content-->Originally posted by BluesMan <br />
Server side scripting is not available. <br />
Well then you are pretty much out of luck because I know it can be done with php.<!--content-->Use display:none; to hide the paragraph that is not required.<!--content-->Originally posted by Fang <br />
Use display:none; to hide the paragraph that is not required. <br />
What do you do when you want to display the paragraph you just hid?<!--content-->document.getElementById('elmID').style.display="block";<!--content-->OK. If you say so. :p <br />
It's Greek to me.<!--content--><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"<br />
"http://www.w3.org/TR/html4/strict.dtd"><br />
<html lang="en"><br />
<head><br />
<title>More Or Less</title><br />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><br />
<script type="text/javascript"><br />
//<![CDATA[<br />
<!--<br />
function MoreOrLess(objID) {<br />
var obj=document.getElementById(objID);<br />
obj.className=(obj.className=='more')? "less" : "more";<br />
}<br />
//--><br />
//]]><br />
</script><br />
<br />
<style type="text/css"><br />
<!--<br />
.moreorless {color:#9cf; text-decoration:underline; cursor:help;}<br />
/* can be display:inline */ <br />
.more {display:block; border:1px solid blue; background:#9cf;}<br />
.less {display:none;}<br />
--><br />
</style><br />
<br />
</head><br />
<body><br />
<p>The standard chunk of <span onclick="MoreOrLess('span1');" class="moreorless">Lorem Ipsum</span><span id="span1" class="less">Lorem Ipsum is simply dummy text of the printing and typesetting industry. <a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.lipsum.com/">website</a></span> used since the 1500s is reproduced below for those interested.</p><br />
</body><br />
</html><!--content-->Thanks. I guess javascript is one way to do it, you have suggested.<br />
I'll try this when I have time. Right now I have too much work to do to do anything else. (Wow! The English-teacher should have seen that phrase ... ):D <br />
<br />
Regards<br />
Bj榇昻<!--content-->Don't forget that some people (6% ish) have javascript disabled though, so they wouldn't be able to use your page.<!--content-->
 
Back
Top