On Thu, 6 Sep 2001, _lallous wrote:

> onMouseOver="info(<?    $xline=__LINE__;
> 
> Dunno, should this be: onMouseOver="info('<?    $xline=__LINE__;.....')
> instead?
> I mean I see no quotes surrounding the javascript string (that is generated
> from PHP).

ok, that what a typo. As I said eariler.  The script works fine if text in
the table is a single line.  If it is multiply lines then it does not
display, but in the source code of the browser it is there, except </BR>
flashing.

Adrian


> 
> 
> "Adrian D'Costa" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi,
> >
> > I am trying to write a dynamic help module based on a mysql database.  I
> > am using Javascript and PHP to do this.
> >
> > This is part of my script (both java and php)
> >
> > <script language="JavaScript">
> > <!--
> >
> > function info(theline)
> > {
> > w
> >
> w=window.open("","test","screenx=10,screeny=10,width=350,height=80,,scrollba
> rs=no");
> > w.document.open();
> > w.document.writeln("<PRE>");
> > w.document.writeln("File Name: " + thename);
> > w.document.writeln("Description: " + theline);
> > w.document.writeln("</PRE>");
> > w.document.close();
> >
> >
> > }
> >
> > //-->
> > </script>
> > <p align="center"></font><a
> > href="offerte.html" onMouseOver="info(<?    $xline=__LINE__;
> >
> > require("user.php");
> > require("error.php");
> > $newuser = new user();
> >
> > $nerror= new error();
> > $xfile=explode("/", __FILE__);
> > $num=sizeof($xfile);
> > $fname=$xfile[$num-1];
> > // Sql Statement
> >
> > $searchStmt = "select * from help where fnumber=$xline and
> > fname='$fname'";
> >
> > //execute the statement for help
> >
> > if(!$result=mysql_query($searchStmt, $newuser->link))
> > {
> > $xerror = $nerror->error1(202);
> > print($xerror);
> > exit();
> > }else{
> > $num=mysql_num_rows($result);
> > if ($num==0)
> > {
> >         $xerror = $nerror->error1(300);
> >         print($xerror);
> >         exit();
> > } else {
> >         $row=mysql_fetch_object($result);
> > }
> > }
> > $xdetail = nl2br($row->hdetail);
> > echo "$xdetail";
> > ?>);">
> >
> > This script works if I have a single line the hdetail field, but if I put
> > multiply lines in the hdetail field nothing shows up.  I added nl2br but
> > nothing work, if you view the source in netscape it is there with the
> > </br>.  I am sure I am doing something wrong, but where I don't know.  Can
> > some one correct me?
> >
> > TIA
> >
> > Adrian
> >
> 
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to