[Zope] How to Use Javascript returns in DTML tags

Scheck, Herman Herman.Scheck@intp.com
Tue, 23 Oct 2001 11:44:30 -0700

I am trying to simply use the return (rfqNumber) from a Javascript script as
a variable in a DTML tag (see code below).  I've also tried placing the
Javascript code in-line to the DTML, as well as trying to encapsulating the
script in a DTML method.  None of this seems to work.  Yes, I am fairly new
to DTML (and Zope, for that matter).  I have seen articles on how to pass
arguments from DTML to Javascript functions, but not on how to use
Javascript returns in DTML.  Can anyone point, push, or drag me in the right
Thanks in advance for any help.
      function GetRFQNumber{
         return rfqNumber;

   <!--FORM ID="GetQuoteForm" ACTION="Quote_html"-->
         <dtml-with siteMethods> 
            <dtml-let DNS=dbDNS UID=dbUID PWD=dbPWD>
               <SELECT NAME="selQuote" SIZE=1>
                  <dtml-in expr="dataAccess(DNS, UID, PWD, 'SELECT
quoteNumber FROM qt_quotes_t,
                    qt_quoteReqs_t WHERE qt_quotes_t.quoteReqID =
qt_quoteReqs_t.quoteReqID AND
                    qt_quoteReqs_t.rfqNumber = ' + _.chr(39) + rfqNumber +
_.chr(39) + ' ORDER BY
                     <dtml-in sequence-item>
                        <OPTION VALUE='<dtml-var sequence-item>'><dtml-var
         <BR><BR><INPUT TYPE="IMAGE" SRC="images/imgRetrieveButton"
ALT="Retrieve Quote Request">