[mod_python] using nested blocks in psp

cloc3 ziapannocchia at gmail.com
Mon Jun 12 05:07:51 EDT 2006


grahamd at dscpl.com.au wrote:
See:
>
>   http://www.modpython.org/pipermail/mod_python/2005-May/018102.html
>
> Comment hints may still be needed in certain cases to turn off scopes
> even if 8 space or tab indents are needed so it is good to understand
> what they are about.
>

Thank you. That solves my problem.
Here the good code:
[code]
<html>
<form>
<select name="Elenco">
<!--genera elenco usando un loop -->

<%
for i in range(50, 350, 50):
%>
        <option value="<%=i%>"
<%
        if 'Elenco' in form and int(form['Elenco'])==i:
%>
                selected
<%
        #end if
%>
        ><%=i%>
        </option>
        <%
# end for
%>
</select>
<input type="submit" value="acquisizione"/>
</form>
</html>
[/code]




More information about the Python-list mailing list