Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > adjusting the height and width of innerHTML

Thread Tools

adjusting the height and width of innerHTML

Posts: n/a
I am a newbie on javascript, and here is a question I'd like to ask.
Thanks in advance for the help. Here you can see my point: right now,
I can ask the div of 'list_comment' to be 250x200. But when
'comments_display.php' is larger than 250x200, I really want a
scrollable list_comment, so that I can scroll down the comment in the


function TurnOnDiv(e, div_name) {
theObject = document.getElementById(div_name); = "250px"; = "200px";
var posx, posy;
if (!e) var e = window.event;
if (e.pageX || e.pageY) {
posx = e.pageX - 250;
posy = e.pageY - 200;
else if (e.clientX || e.clientY) {
posx = e.clientX + document.body.scrollLeft +
document.documentElement.scrollLeft - 250;
posy = e.clientY + document.body.scrollTop +
document.documentElement.scrollTop - 200;
} = posx + "px"; = posy + "px"; = "visible";

function ProcessAjax(serverPage, objID) {
xmlhttp = GetXmlHttpObject();
var obj = document.getElementById(objID);"GET", serverPage);
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
obj.innerHTML = xmlhttp.responseText;


<div id="list_comment" style="visibility: hidden"> </div>

<p style="font-size: 13px" > <a href="javascript://"
onclick="TurnOnDiv(event, 'list_comment');
ProcessAjax('comments_display.php', 'list_comment')">Read Comments

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why can't I change height with <col width="50" height="100">? Bernd Meier HTML 6 01-14-2008 07:25 AM
CSS question: Using height/width at 100% with fixed-width borders/margin/padding cera HTML 1 08-18-2007 02:59 AM
TD height not adjusting to new breaks added to innerHTML Fredyy Javascript 3 07-14-2006 02:48 AM
CSS min-width, max-width, and min-height with display:inline Lois HTML 1 12-27-2004 03:03 AM
Adjusting the width and height of a popup window Jesse Joseph Acosta Javascript 1 11-18-2003 09:33 PM