Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > HELP!!!! Scrolling Div Problem

Reply
Thread Tools

HELP!!!! Scrolling Div Problem

 
 
SMYERS
Guest
Posts: n/a
 
      09-04-2005
Hi...

Here is my issue and I hope someone can help me here!!!

I am putting together a logging application, I created a layered dhtml
popup to position over the parent window. When I call up the details
of a certain record, in the sql database its type is TEXT and on the
php side im using echo nl2br($variable);

When I do that it will inside the scrolling div display 1 line of
information NO PROBLEM, but lets say I edit the record and put 2 or
more lines in it... NOPE comes up totally blank, inface the include
doesnt even seem to load with it... I can strip it all out and do a
simple echo no problem there so I know the file im including IS
loading...

Funny thing is, I can echo the same text 100x no problem, the div will
scrolll...

I have searched google all over to no luck, find everything but what I
am looking for!

Any help would be greatly apreciated...

Thanks


Sample code:

SQL:
| entrytext | text | YES | MUL | NULL

DHTML:
<SCRIPT LANGUAGE="JScript">
var engedPopup = window.createPopup();
function engeditlogs()
{
var engedPopBody = engedPopup.document.body;
engedPopBody.style.backgroundColor = "white";
engedPopBody.style.border = "solid black 0px";
engedPopBody.innerHTML = "<div style=\"border : solid 0px #ff0000;
background : #ffffff; color : #000000; padding : 4px; width : 469px;
height :244px; overflow : auto;\" \><FONT face=verdana
size=1><b>Current Details:</b><br><br><? include('eng-edit.php');
?></FONT></div>";
engoPopup.show(505, 188, 470, 250, document.body);
}
</SCRIPT>
(This gets called in the php code... and have verified this is being
called properly...)
After that gets called it includes the file you see above and this is
that files code:

PHP:
$id=$_GET[id];
$incidentno=$_GET[editincident];
$editincident=$_GET[editincident];
$clstatus=$_GET[clstatus];
echo "Engineering Log $incidentno<br><br>";
mysql_connect("localhost", "root","nissanz");
mysql_select_db("supportdb");
$query ="SELECT entrytitle, entrytext, entrydate, soid,
incidentno, oc";
$query.=" FROM securityrep WHERE incidentno=$incidentno";
$result=mysql_query($query);
while
(list($entrytitle,$entrytext,$entrydate,$soid,$inc identno, $oc) =$
mysql_fetch_row($result)) {
echo "<br>Operator ID: <strong>$soid</strong> - ";
echo "Call Status: <strong>$oc</strong><br>";
echo "Date Entered: <b>$entrydate</b><br>";
echo "Problem: <b>$entrytitle</b><br>";
echo "<br>";
echo "<b>Details of problem:</b>";
PROBLEM----> // echo nl2br($entrytext);


Ok, if i uncomment that, and the record contains ONLY 1 single line, it
will display, if it has more then 1 lines 2 or more even, it will now
display the contents of this include AT ALL.

Sorry for the long post and thanks again!

 
Reply With Quote
 
 
 
 
Richard Cornford
Guest
Posts: n/a
 
      09-04-2005
SMYERS wrote:
> Here is my issue and I hope someone can help me here!!!
>
> I am putting together a logging application, I created a layered dhtml
> popup to position over the parent window. When I call up the details
> of a certain record, in the sql database its type is TEXT and on the
> php side im using echo nl2br($variable);
>
> When I do that it will inside the scrolling div display 1 line of
> information NO PROBLEM, but lets say I edit the record and put 2 or
> more lines in it... NOPE comes up totally blank, inface the include
> doesnt even seem to load with it... I can strip it all out and do a
> simple echo no problem there so I know the file im including IS
> loading...
>
> Funny thing is, I can echo the same text 100x no problem, the div will
> scrolll...
>
> I have searched google all over to no luck, find everything but what I
> am looking for!
>
> Any help would be greatly apreciated...

<snip>

One of the most useful thing that anyone using a server-side scripting
language can do is learn to appreciate the separation between what they
do on the server and what happens on the client.

What your PHP does (and any other server-side scripting technology does)
is build an HTTP response that is sent to a client. The client acts
entirely based on what it receives in that response and it knows nothing
about the server-side technology that built it.

If the client does not do what you are expecting with that response
there is only a limited value in looking at the server-side code that
created it. It is frequently (indeed almost invariably) more valuable in
diagnosing unexpected behaviour on the client to be looking at the
output from the server side code (the actual HTTP response text
(assuming it is text, rather than binary)), and you most often do this
be using the 'view-source' facility of the browser.

In viewing the source that is sent to the browser you should be able to
see the cause of the issue, and if you cannot see it the odds are good
that someone here will be able to see it.

Richard.


 
Reply With Quote
 
 
 
Reply

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
<div ... /> and <div ...></div> K Viltersten ASP .Net 4 03-31-2009 07:33 PM
smooth scrolling & auto scrolling sillyputty Firefox 1 08-24-2007 02:10 AM
scrolling within div triggered by jump:restrict to div stan HTML 0 01-18-2007 03:07 AM
NS/FF don't change div offsetWidth when div innerHTML is added toand div becomes wider mscir Javascript 3 06-26-2005 04:04 PM
Q: Div A inside Div B is larger than Div B Dwayne Madsen Javascript 1 06-01-2005 03:02 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57