in************* ****@gmail.com a écrit :
>
Ps: Is there any possibility of not using the XmlHttpRequest?
In JavaScript You can have in your page your entire article truncated :
<p class="article" >
Today, there are too many wars in the world
<span>...<br>
<cite>
<a href="complete. php" onclick="readMo re(this); return false;">
"Read More"
</a>
</cite>
</span>
<span class="less">
.<br>
This is caused by :<br>
etc <br>
etc.<br>
<cite>
<a href="complete. php" onclick="readMo re(this); return false;">
"Read Less"
</a>
</cite>
</span>
</p>
and in header :
<style type="text/css">
p.article span { display: inline; }
p.article span.less { display: none; }
p.article_all span { display: none; }
p.article_all span.less { display: inline; }
p cite { margin-left: 70%; }
</style>
<script type="text/javascript">
function readMore(what) {
what = what.parentNode .parentNode.par entNode;
what.className = what.className= ='article'? 'article_all' : 'article';
}
</script>
--
ASM