[Zope] Searching method using DTML

Angietel angietel@hotmail.com
Tue, 16 Jan 2001 09:20:30 +0800


This is a multi-part message in MIME format.

------=_NextPart_000_0056_01C07F9D.923DF1A0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<dtml-if "_['custname']!=3D''AND _['custid']=3D=3D''">

      <dtml-call "sqlSearchcust3">

<dtml-elif "_['custid']!=3D''AND _['custname']=3D=3D''">

       <dtml-call "sqlSearchcust2">
 =20
<dtml-elif "_['custid']!=3D''AND _['custname']!=3D''">

       <dtml-call "sqlSearchcust">
 =20
<dtml-else>

       <dtml-var expr=3D"REQUEST['/Customer/View/searchallcust']">

</dtml-if>


The ZOPE error is like :-

Expression (Python) Syntax error:=20
invalid syntax

, for tag <dtml-if "_['custname']!=3D''AND _['custid']=3D=3D''">, on =
line 20 of a

------=_NextPart_000_0056_01C07F9D.923DF1A0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2919.6307" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>&lt;dtml-if "_['custname']!=3D''AND=20
_['custid']=3D=3D''"&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;dtml-call=20
"sqlSearchcust3"&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;dtml-elif "_['custid']!=3D''AND=20
_['custname']=3D=3D''"&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;dtml-call=20
"sqlSearchcust2"&gt;<BR>&nbsp; <BR>&lt;dtml-elif "_['custid']!=3D''AND=20
_['custname']!=3D''"&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;dtml-call=20
"sqlSearchcust"&gt;<BR>&nbsp; <BR>&lt;dtml-else&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;dtml-var=20
expr=3D"REQUEST['/Customer/View/searchallcust']"&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;/dtml-if&gt;<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The ZOPE error is like :-</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial><FONT size=3D2><STRONG>Expression (Python) =
Syntax=20
error</STRONG>: </FONT><PRE><FONT size=3D2>invalid syntax
</FONT></PRE><FONT size=3D2>, for tag &lt;dtml-if =
"_['custname']!=3D''AND=20
_['custid']=3D=3D''"&gt;, on line 20 of =
a</FONT></DIV></FONT></BODY></HTML>

------=_NextPart_000_0056_01C07F9D.923DF1A0--