Passing a string to a dtml method
I do have a question about the anti-spam solution, though. If I create a dtml-method, call it "email", like this: <FORM METHOD="POST" ACTION="/Util/send"> <INPUT TYPE="HIDDEN" NAME="name" VALUE="bruce"> <INPUT TYPE="HIDDEN" NAME="domain" VALUE="EckelObjects.com"> <INPUT TYPE="HIDDEN" NAME="subject" VALUE="Here is the subject line"> <INPUT TYPE="SUBMIT" VALUE="Send Email to Bruce"> </FORM> is there a way to pass the 'subject' string in during a call to the dtml method, so that I could do something like this inside a dtml document or method: <dtml-var email, subject="Here is the subject line"> (obviously I can't use that syntax) Most current information can be found at: http://www.mindview.net/Etc/notes.html =================== Bruce Eckel http://www.BruceEckel.com Contains free electronic books: "Thinking in Java 2e" & "Thinking in C++ 2e" Please subscribe to my free newsletter -- just send any email to: join-eckel-oo-programming@earth.lyris.net My schedule can be found at: http://www.mindview.net/Calendar ===================
----- Original Message ----- From: "Bruce Eckel" <Bruce@EckelObjects.com> To: <chrism@digicool.com> Cc: <zope@zope.org>; <ecofsky@theUNIXman.com> Sent: Saturday, December 01, 2001 13:33 Subject: [Zope] Passing a string to a dtml method
I do have a question about the anti-spam solution, though. If I create a dtml-method, call it "email", like this:
<FORM METHOD="POST" ACTION="/Util/send"> <INPUT TYPE="HIDDEN" NAME="name" VALUE="bruce"> <INPUT TYPE="HIDDEN" NAME="domain" VALUE="EckelObjects.com"> <INPUT TYPE="HIDDEN" NAME="subject" VALUE="Here is the subject line"> <INPUT TYPE="SUBMIT" VALUE="Send Email to Bruce"> </FORM>
is there a way to pass the 'subject' string in during a call to the dtml method, so that I could do something like this inside a dtml document or method:
<dtml-var email, subject="Here is the subject line">
(obviously I can't use that syntax)
What about <dtml-var "email(subject='blabla...')"> ? Andreas
<dtml-var "email(_.None, _, subject="Here is the subject")"> Arbitrary keyword arguments can be passed in as the third and subsequent arguments to DTML methods/documents and they will be looked up and used in the called DTML method/document. Bruce Eckel wrote:
I do have a question about the anti-spam solution, though. If I create a dtml-method, call it "email", like this:
<FORM METHOD="POST" ACTION="/Util/send"> <INPUT TYPE="HIDDEN" NAME="name" VALUE="bruce"> <INPUT TYPE="HIDDEN" NAME="domain" VALUE="EckelObjects.com"> <INPUT TYPE="HIDDEN" NAME="subject" VALUE="Here is the subject line"> <INPUT TYPE="SUBMIT" VALUE="Send Email to Bruce"> </FORM>
is there a way to pass the 'subject' string in during a call to the dtml method, so that I could do something like this inside a dtml document or method:
<dtml-var email, subject="Here is the subject line">
(obviously I can't use that syntax)
Most current information can be found at: http://www.mindview.net/Etc/notes.html =================== Bruce Eckel http://www.BruceEckel.com Contains free electronic books: "Thinking in Java 2e" & "Thinking in C++ 2e" Please subscribe to my free newsletter -- just send any email to: join-eckel-oo-programming@earth.lyris.net My schedule can be found at: http://www.mindview.net/Calendar ===================
-- Chris McDonough Zope Corporation http://www.zope.org http://www.zope.com "Killing hundreds of birds with thousands of stones"
Hi Bruce, make your email dtml method something like this: <FORM METHOD="POST" ACTION="/Util/send"> <INPUT TYPE="HIDDEN" NAME="name" VALUE="bruce"> <INPUT TYPE="HIDDEN" NAME="domain" VALUE="EckelObjects.com"> <INPUT TYPE="HIDDEN" NAME="subject" VALUE="<dtml-var subject>"> <INPUT TYPE="SUBMIT" VALUE="Send Email to Bruce"> </FORM> then render it as: <dtml-var "email(_.None, _, subject='Here comes some email Bruce!')"> -steve On Saturday, December 1, 2001, at 01:33 PM, Bruce Eckel wrote:
I do have a question about the anti-spam solution, though. If I create a dtml-method, call it "email", like this:
<FORM METHOD="POST" ACTION="/Util/send"> <INPUT TYPE="HIDDEN" NAME="name" VALUE="bruce"> <INPUT TYPE="HIDDEN" NAME="domain" VALUE="EckelObjects.com"> <INPUT TYPE="HIDDEN" NAME="subject" VALUE="Here is the subject line"> <INPUT TYPE="SUBMIT" VALUE="Send Email to Bruce"> </FORM>
is there a way to pass the 'subject' string in during a call to the dtml method, so that I could do something like this inside a dtml document or method:
<dtml-var email, subject="Here is the subject line">
(obviously I can't use that syntax)
Most current information can be found at: http://www.mindview.net/Etc/notes.html =================== Bruce Eckel http://www.BruceEckel.com Contains free electronic books: "Thinking in Java 2e" & "Thinking in C++ 2e" Please subscribe to my free newsletter -- just send any email to: join-eckel-oo-programming@earth.lyris.net My schedule can be found at: http://www.mindview.net/Calendar ===================
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Even better: <INPUT TYPE="HIDDEN" NAME="subject" VALUE="<dtml-var subject missing="A default subject">"> -steve On Saturday, December 1, 2001, at 01:48 PM, Steve Spicklemire wrote:
<INPUT TYPE="HIDDEN" NAME="subject" VALUE="<dtml-var subject>">
participants (4)
-
Andreas Jung -
Bruce Eckel -
Chris McDonough -
Steve Spicklemire