Hi Jonathan,<br><br>Thanks a lot, it works today, but it was acting up a bit yesterday.&nbsp; I really appreciate it, maybe I just needed to completely get rid of the browser cache.<br><br>Peace and thanks again,<br>Muk<br><br>
<div><span class="gmail_quote">On 8/17/06, <b class="gmail_sendername">Jonathan</b> &lt;<a href="mailto:dev101@magma.ca">dev101@magma.ca</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>





<div bgcolor="#ffffff">
<div><font face="Arial" size="2">If you have a line like</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">&lt;input type=&quot;text&quot; name=&quot;first_name&quot; 
value=&quot;default value&quot;&gt;</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">in your html file then if you try the following in 
your script file</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">print REQUEST['first_name']&nbsp; </font></div>
<div><font face="Arial" size="2">return printed</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">you should see &quot;default value&quot; printed 
out</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">you can try:</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">print REQUEST</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">to see the entire contents of REQUEST (very 
informative)</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">Note: if you do not have a default value in your 
&lt;input&gt; statement and you do not enter anything in the input field when 
the form is displayed, then when the form is submitted REQUEST will not contain 
an entry for the corresponding form field (an entry is made in REQUEST only when 
data is entered in the form field)</font></div></div><div><span class="sg">
<div>&nbsp;</div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">Jonathan</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
</span></div><div><blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;"></blockquote></div><div><span class="q">
  <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div>
  <div style="background: rgb(228, 228, 228) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>From:</b> 
  <a title="myan@umich.edu" href="mailto:myan@umich.edu" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Muk Yan</a> </div>
  <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="dev101@magma.ca" href="mailto:dev101@magma.ca" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Jonathan</a> </div></span></div><div><span class="e" id="q_10d1de23b480088e_4">
  <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Cc:</b> <a title="zope@zope.org" href="mailto:zope@zope.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
zope@zope.org</a> </div>
  <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Thursday, August 17, 2006 4:40 
  PM</div>
  <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> Re: [Zope] Python Scripts and 
  HTML Forms</div>
  <div><br></div>Hey All,<br><br>Sorry about that, what I meant is that I get a 
  KeyError. It says that the first_name in REQUEST['first_name'] is not found, 
  when I try to set the variable in line in the script where <span><font face="Arial" size="2">fname = 
  REQUEST['first_name'].<br><br>Thanks in 
  advance.<br><br>Cheers,<br>Muk<br></font></span><br>
  <div><span class="gmail_quote">On 8/17/06, <b class="gmail_sendername">Jonathan</b> &lt;<a href="mailto:dev101@magma.ca" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> 
  dev101@magma.ca</a>&gt; wrote:</span>
  <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div>
    <div bgcolor="#ffffff">
    <div><font face="Arial" size="2">What does &quot;it doesn't seem to work&quot; mean?&nbsp; 
    Error messages/traceback? What does your form &amp; script contain?&nbsp; 
    More info on the problem is definitely required!</font></div></div>
    <div><span>
    <div><font face="Arial" size="2"></font>&nbsp;</div>
    <div><font face="Arial" size="2"></font>&nbsp;</div>
    <div><font face="Arial" size="2"></font>&nbsp;</div>
    <div><font face="Arial" size="2">Jonathan</font></div></span></div>
    <div>
    <blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;"></blockquote></div>
    <div><span>
    <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- 
    Original Message ----- </div>
    <div style="background: rgb(228, 228, 228) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>From:</b> 
    <a title="myan@umich.edu" href="mailto:myan@umich.edu" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Muk Yan</a> </div></span></div>
    <div><span>
    <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> 
    <a title="dev101@magma.ca" href="mailto:dev101@magma.ca" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Jonathan</a> ; <a title="zope@zope.org" href="mailto:zope@zope.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
zope@zope.org</a> </div>
    <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> 
    Thursday, August 17, 2006 4:20 PM</div>
    <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> 
    Re: [Zope] Python Scripts and HTML Forms</div>
    <div><br></div>Hey Jonathan, All,<br><br>Thanks I tried your solution, but 
    it doesn't seem to work.&nbsp; Can anybody shed some more light on this 
    situation, since what Jonathan provides is exactly what I want to do, but 
    it's not working.<br><br>Am I forgetting to put parameteres or some other 
    newbie mistake like that?<br><br>Thanks in advance and thanks again 
    Jonathan.<br><br>-Muk<br><br>
    <div><span class="gmail_quote">On 8/17/06, <b class="gmail_sendername">Jonathan</b> &lt;<a href="mailto:dev101@magma.ca" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">dev101@magma.ca</a>&gt; wrote: 
    </span>
    <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
      <div>
      <div bgcolor="#ffffff">
      <div><font face="Arial" size="2">Form variables are stored in REQUEST. In a 
      python script you gain access to REQUEST by:</font></div>
      <div><font face="Arial" size="2"></font>&nbsp;</div>
      <div><font face="Arial" size="2">REQUEST&nbsp;= 
      container.REQUEST<br></font></div>
      <div><font face="Arial" size="2">you can then access the form variables 
      by:</font></div>
      <div><font face="Arial" size="2"></font>&nbsp;</div>
      <div><font face="Arial" size="2">fname = REQUEST['first_name']</font></div>
      <div><font face="Arial" size="2"></font>&nbsp;</div>
      <div><font face="Arial" size="2"></font>&nbsp;</div>
      <div><font face="Arial" size="2">you can check for the presence of a form 
      variable by</font></div>
      <div><font face="Arial" size="2"></font>&nbsp;</div>
      <div><font face="Arial"><font size="2">if 
      REQUEST.has_key('first_name'):</font></font></div>
      <div><font face="Arial"><font size="2"></font></font>&nbsp;</div>
      <div><font face="Arial"><font size="2">or</font></font></div>
      <div><font face="Arial"><font size="2"></font></font>&nbsp;</div>
      <div><font face="Arial"><font size="2">if REQUEST.get('first_name', 
      None):</font></font></div>
      <div><font face="Arial"><font size="2"></font></font>&nbsp;</div>
      <div><font face="Arial"><font size="2"></font></font>&nbsp;</div>
      <div><font face="Arial"><font size="2">hth</font></font></div>
      <div><font face="Arial"><font size="2"></font></font>&nbsp;</div>
      <div><font face="Arial"><font size="2">Jonathan</font></font></div>
      <div><font face="Arial"><font size="2"></font></font>&nbsp;</div>
      <blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;"></blockquote></div>
      <div><span>
      <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- 
      Original Message ----- </div>
      <div style="background: rgb(228, 228, 228) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>From:</b> 
      <a title="myan@umich.edu" href="mailto:myan@umich.edu" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Muk Yan</a> </div>
      <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> 
      <a title="zope@zope.org" href="mailto:zope@zope.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">zope@zope.org</a> </div>
      <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> 
      Thursday, August 17, 2006 2:57 PM</div>
      <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> 
      [Zope] Python Scripts and HTML Forms</div>
      <div><br></div>Dear Trusted Zope Zealots,<br><br>This subject was a bit 
      too broad to do a google search on, because I've tried and the lack of 
      relevancy was astounding.<br><br>I've probably been committing a cardinal 
      sin in DTML, but I couldn't figure any other work around. <br><br>I have 
      an HTML form in a DTML Document say:<br><br>&lt;form 
      action=&quot;process_this_form&quot; method=&quot;post&quot;<br><br>Name:&lt;input type=&quot;text&quot; 
      name:&quot;first_name&quot;&gt;<br><br>&lt;/form&gt; <br><br>I want to use 
      &quot;first_name&quot; in a python script, but what I've been doing is setting it in 
      the process_this_form, which is a DTML method:<br><br>DTML Method, 
      process_this_form:<br>&lt;dtml-call &quot;REQUEST.SESSION.set ('firstName', 
      first_name)&gt;<br>&lt;dtml-call 
      &quot;this_is_a_python_script()&quot;&gt;<br><br>and in the Python Script, 
      this_is_a_python_script<br>I use 
      REQUEST.SESSION.get('firstName')<br><br>What my question is, is there 
      anyway to directly access &quot;first_name&quot; from the form in the python script 
      without having to have to call the &lt;dtml-call &quot; 
      REQUEST.SESSION.set('firstName', first_name)&gt; and then 
      REQUEST.SESSION.get('firstName') in the python script.&nbsp; Sort of a 
      sophomoric question, but any help would be appreciated.&nbsp; Thanks in 
      advance.<br><br>-Muk<br></span></div>
      <div>
      <p></p>
      <hr>

      <p></p>_______________________________________________<br>Zope 
      maillist&nbsp; -&nbsp; <a href="mailto:Zope@zope.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Zope@zope.org</a><br><a href="http://mail.zope.org/mailman/listinfo/zope" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://mail.zope.org/mailman/listinfo/zope</a><br>**&nbsp;&nbsp; 
      No cross posts or HTML encoding!&nbsp; **<br>(Related lists - <br>&nbsp;<a href="http://mail.zope.org/mailman/listinfo/zope-announce" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://mail.zope.org/mailman/listinfo/zope-announce 
      </a><br>&nbsp;<a href="http://mail.zope.org/mailman/listinfo/zope-dev" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> 
      http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br>
      <p></p></div></div></blockquote></div><br></span></div>
    <div></div></div></blockquote></div><br></span></div><div></div>

</div></blockquote></div><br>