HELP!!!! Scrolling Div Problem

S

SMYERS

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,$incidentno, $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!
 
R

Richard Cornford

SMYERS said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top