Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language DHTML

Date:04/20/05
Author:Anonymous
URL:n/a
Comments:2
Info:n/a
Score: (1.75 in 4 votes)
DTML (Document Template Markus Language) is the scripting language
of the web management tool 'Zope'.


<dtml-call "REQUEST.set('i',_.range(0,100,1))">
<dtml-call "REQUEST.set('r',99)">

<dtml-in i reverse>

<dtml-if expr="r==1">
   <dtml-var sequence-item> bottle of beer on the wall, <dtml-var
sequence-item> bottle of beer
   take one down, pass it around,
   <dtml-var sequence-item> bottle of beer.
<dtml-elif expr="r==0">
   no more bottles of beer on the wall.
   Go to the store, buy some more.
<dtml-else>
   <dtml-var sequence-item> bottles of beer on the wall, <dtml-var
sequence-item> bottles of beer
   take one down, pass it around,
   <dtml-var sequence-item> bottles of beer.
</dtml-if>

<dtml-call "REQUEST.set('r',r-1)">

</dtml-in>

Download Source | Write Comment

Alternative Versions

Comments

>>  Andrew W said on 12/24/05 17:00:18

Andrew W DHTML != DTML, someone please change the heading.

A proper DHTML answer would be an HTML page using javascript to insert the answer, and I believe a javascript version has already been done.

>>  bs said on 03/12/06 19:17:28

bs Yep, and a dtml-Version is already found under 'Z' for Zope!

Download Source | Write Comment

Add Comment

Please provide a value for the fields Name, Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.

Please don't post large portions of code here! Use the form to submit new examples or updates instead!

Name:

eMail:

URL:

Security Code:
  
Comment: