[Zope-dev] using <dtml-in> to call zsql method

Fionan King fionank@engitech.ie
Tue, 29 Oct 2002 11:03:17 -0000


This is a multi-part message in MIME format.

------=_NextPart_000_0031_01C27F3A.C900D1A0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

i am using the <dtml-in> tag to call a zsql method
based on the results of this query i call a another dtml document.
however i am getting a error when i submit the form it trys to download =
the page it is calling next is this a common error?
Is there any other way i can call a zsql method and make the results =
available to the rest of a dtml document without using the <dtml-in>?
heres the code i am using

<dtml-in =
expr=3D"sql_query_cust_request_authorize(CustName=3DCustName,userName=3Du=
serName,password=3Dpassword)">
<dtml-if db_username>
  <dtml-call =
expr=3D"sql_query_cust_request_authorize(CustName=3DCustName,userName=3Du=
serName,password=3Dpassword,policies=3D'mainUser')">
  <dtml-if db_policies>
    <dtml-var send_customer_request>
  <dtml-else>
    Here2
    <dtml-var cust_authorize_fail>
  </dtml-if>
<dtml-else>
  <dtml-var cust_authorize_fail>
</dtml-if>
</dtml-in>

cheers



------=_NextPart_000_0031_01C27F3A.C900D1A0
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 http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>i am using the &lt;dtml-in&gt; tag to =
call a zsql=20
method</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>based on the results of this query i =
call=20
a&nbsp;another dtml document.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>however i am getting a error when i =
submit the form=20
it trys to download the page it is calling next is this a common=20
error?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Is there any other way i can call a =
zsql method and=20
make the results available to the rest of a dtml document without using =
the=20
&lt;dtml-in&gt;?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>heres the code i am using</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;dtml-in=20
expr=3D"sql_query_cust_request_authorize(CustName=3DCustName,userName=3Du=
serName,password=3Dpassword)"&gt;<BR>&lt;dtml-if=20
db_username&gt;<BR>&nbsp; &lt;dtml-call=20
expr=3D"sql_query_cust_request_authorize(CustName=3DCustName,userName=3Du=
serName,password=3Dpassword,policies=3D'mainUser')"&gt;<BR>&nbsp;=20
&lt;dtml-if db_policies&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;dtml-var=20
send_customer_request&gt;<BR>&nbsp; =
&lt;dtml-else&gt;<BR>&nbsp;&nbsp;&nbsp;=20
Here2<BR>&nbsp;&nbsp;&nbsp; &lt;dtml-var =
cust_authorize_fail&gt;<BR>&nbsp;=20
&lt;/dtml-if&gt;<BR>&lt;dtml-else&gt;<BR>&nbsp; &lt;dtml-var=20
cust_authorize_fail&gt;<BR>&lt;/dtml-if&gt;<BR>&lt;/dtml-in&gt;<BR></FONT=
></DIV>
<DIV><FONT face=3DArial size=3D2>cheers</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><BR></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0031_01C27F3A.C900D1A0--