473,396 Members | 2,108 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

comments within a scrolling div gets cut off at the end

anfetienne
424 256MB
Hi,

I've written the code below to access a db to retrieve comments and list them on a page. this is done within a scolling div layer with overflow=auto.

within this once a comment is displayed there is a comment link so people can reply... for some reason at the comment at the bottom of the list if you click on comment to reply instead of the scroll div expanding more to show it, it gets cut off.

here is my php code and for anyone that wants to look at exactly what i mean PM me so i can send you login details to view it

Expand|Select|Wrap|Line Numbers
  1. <? error_reporting(E_ALL);
  2.  
  3. mysql_connect($hostname,$username,$password);
  4. @mysql_select_db($database) or die( "Unable to select database");
  5.  
  6. $homeSQLA = "SELECT * FROM statusUpdates WHERE comOrigin = '{$userName}' AND comOrder = '1' ORDER BY dateAdded DESC";
  7. $homeRESA = mysql_query( $homeSQLA ) or die( mysql_error );
  8.  
  9. if ( mysql_num_rows( $homeRESA ) > 0 ){
  10.  
  11.     while($originalPost = mysql_fetch_array($homeRESA)){
  12.  
  13. $origun = $originalPost['userName'];
  14. $originalUserAV = "user/$origun/av/av.jpg";
  15. $originalUserAVsmall = "user/$origun/av/av_small.jpg";
  16. $jQuotes = "'";
  17.  
  18. echo '<div style="width:440px; height:auto; overflow:visible">';          
  19. echo '<table width="440" border="0" cellpadding="0" cellspacing="0">';
  20. echo '<tr>';
  21. echo '<td width="60" height="60" rowspan="4" valign="top"><img src="'.$originalUserAV .'" width="60" height="60" /></td>';
  22. echo '<td width="10" valign="top">&nbsp;</td>';
  23. echo '<td width="355" height="18" valign="top" style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; text-align:justify;" class="topBoxLINKS"><a href="profile.php?userName='.$originalPost['comOrigin'] .'">'.$originalPost['firstName'] .' '. $originalPost['lastName'] .'</a> <span style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; font-weight:100; text-align:justify;">'.$originalPost['comment'] .'</span><br /><span style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; font-weight:bold; text-align:justify;">'.$originalPost['dateAdded'] .' - <a href="javascript:showhide('.$jQuotes.$originalPost['commentID'].$jQuotes .');"><span style="font-size:10px;">comment</span></a></span> </td>';
  24. echo '</tr>';
  25. echo '<tr>';
  26. echo '<td width="10">&nbsp;</td>';
  27. echo '<td height="auto" valign="top">';
  28. echo '<ul id="wall" style="width:300px; list-style-type:none; vertical-align:top; text-align:left; padding:-10px;">';
  29.  
  30. $originComID = $originalPost['commentID'];
  31.  
  32.     $homeSQLB = "SELECT * FROM statusUpdates WHERE commentID = '{$originComID}' AND comOrder >= '2' ORDER BY dateAdded";
  33.     $homeRESB = mysql_query( $homeSQLB ) or die( mysql_error );
  34.  
  35.     while($replyPosts = mysql_fetch_array($homeRESB))
  36.     {
  37.     echo '<li class="topBoxLINKS"><div style="position: relative; margin-bottom:-25px;"><div style="position: relative; height:40px; width:40px;background:url('.$replyPosts['userAV'].'); background-repeat:no-repeat; left:-40px; top:0px;"></div><div style="position: relative; height:auto; width:300px; left:10px; top:-46px;"><a href="profile.php?userName='.$replyPosts['userName'] .'">'.$replyPosts['firstName'] .' '. $replyPosts["lastName"] .'</a> <span style="left:10px; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; font-weight:100; text-align:justify;">'.$replyPosts['comment'] .'</span><br /><span style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; font-weight:bold; text-align:justify;">'.$replyPosts['dateAdded'] .'</span></div></div></li>';
  38.     }
  39.  
  40. echo '</ul></td>';
  41. echo '</tr>';
  42.   echo '<tr>';
  43.     echo '<td width="10" style="height:1px;">&nbsp;</td>';
  44.     echo '<td>';
  45.     echo '<div id="'.$originalPost['commentID'] .'" style="display:none;">';
  46. echo '<form action="process.php" id="form_'.$originalPost['commentID'] .'" method="POST">';
  47. echo '<span class="w">';
  48. echo '<div align="left"><textarea cols="45" name="commentC" id="commentC" class="input"></textarea></div>';
  49. echo '</span>';
  50. echo '<input type="hidden" name="userName" id="userName" value="'.$userName .'"/>';
  51. echo '<input type="hidden" name="userAV" id="userAV" value="'.$originalUserAVsmall .'"/>';
  52. echo '<input type="hidden" name="originID" id="originID" value="'.$originalPost['comOrigin'] .'"/>';
  53. echo '<input type="hidden" name="commentID" id="commentID" value="'.$originalPost['commentID'] .'"/>';
  54. echo '<input type="hidden" name="firstName" id="firstName" value="'.$firstName .'"/>';
  55. echo '<input type="hidden" name="lastName" id="lastName" value="'.$lastName .'"/>';
  56. echo '<input type="hidden" name="formLocation" id="formLocation" value="statusReply"/>';
  57. echo '<input type="hidden" name="returnURL" id="returnURL" value="'.$returnURL .'"/>';
  58. echo '<div align="right"><input type="submit" id="submit" value="Comment"/></div>';
  59. echo '</form>';
  60. echo '</div>';
  61. echo '</td>';
  62. echo '</tr>';
  63. echo '</table>';    
  64. echo '</div>';
  65.     }
  66. } else {
  67.  echo '<span style="text-align:left; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold;">You currently have no news updates!</span>';
  68. }
  69. echo '<br/>';
  70. echo '<br/>';
  71. ?>
  72.  
Apr 28 '10 #1
0 1421

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: windandwaves | last post by:
Hi Folks I have just completed a project for an accommodation finder in New Zealand - much with your help - thank you again. I would appreciate any constructive or deconstructive comments. ...
4
by: Cat Laugel | last post by:
Hello, I am redesigning my website and would like to have the text scroll within the webpage without the page itself scrolling.... if you understand what I mean... ;-) I want a very sleek look...
7
by: David Hayes | last post by:
I tried finding an answer on http://www.quirksmode.org/ without success. I am attempting a complicated Frames structure. I have made it work in IE, but not Netscape. I begin with three...
28
by: Benjamin Niemann | last post by:
Hello, I've been just investigating IE conditional comments - hiding things from non-IE/Win browsers is easy, but I wanted to know, if it's possible to hide code from IE/Win browsers. I found...
10
by: Monk | last post by:
Hi, Have a query regarding comments that extend over multiple-lines. Would like to know if the standard's view of this, so that we can create a code which doesn't run into compiler specific...
0
by: Tim Bücker | last post by:
Hello. I have a listview and a listbox. If the listbox gets vertically scrolled, the listview should make the same movement. So I have extended the listbox control: public class...
13
by: ukrbend | last post by:
I'm new to Javascript and to html and am trying to make the following code snippet work but it doesn't. It refuses to call the getPage() function and I always get a 404 error. I know the code is...
5
by: stan | last post by:
This is a follow-up to an earlier posting - this time with sample code. In the code below, the jump within the div causes movement within the div and as well withing the page as a whole. I am...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.