SunQuest
 
       Zope
  Home arrow Zope arrow Page 7 - Zope And MySQL
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
Moblin 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ZOPE

Zope And MySQL
By: icarus, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 26
    2002-04-10

    Table of Contents:
  • Zope And MySQL
  • Making The Connection
  • Adapting To The Environment
  • The Magic Of The Movies
  • Visiting The Box Office
  • Adding Things Up
  • Submitting To The King
  • Erasing The Past
  • Of Methods And Madness

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!

    Zope And MySQL - Submitting To The King


    (Page 7 of 9 )

    If you're familiar with DTML, you'll know that the two objects above can be combined into a single one by creative use of an "if" conditional test keyed to the form's "submit" variable. And that's exactly what I've done next - a DTML Method named "add" which includes both the initial form and the form processor.

    <dtml-var standard_html_header> <dtml-if submit> <dtml-call insertMethod> <h2>Item added!</h2> <p> <a href="list">View the entire collection</a> or <a href="add">add another title</a> <dtml-else> <h2>Add DVD</h2> <form action="add" method="POST"> <table border=0> <tr> <td>Title</td> <td><input name="title" width=30 value=""></td> </tr> <tr> <td>Director</td> <td><input name="director" width=30 value=""></td> </tr> <tr> <td>Cast</td> <td><input name="cast" width=30 value=""></td> </tr> <tr> <td>Genre</td> <td><input name="genre" width=30 value=""></td> </tr> <tr> <td colspan=2 align=center> <input type="submit" name="submit" value="Add DVD"> </td> </tr> </table> </form> </dtml-if> <dtml-var standard_html_footer>
    Using this two-in-one technique can reduce the number of objects in your collection, and perhaps make things easier on the eyes.

    More Zope Articles
    More By icarus, (c) Melonfire


     

       

    ZOPE ARTICLES

    - Creating Zope Products
    - Plone Content Types With Archetypes
    - Flat User Management in Zope
    - Creating Basic Zope Applications
    - Getting started with Zope for Linux and Sola...
    - ZPT Basics (part 4)
    - ZPT Basics (part 3)
    - ZPT Basics (part 2)
    - ZPT Basics (part 1)
    - Exception Handling In DTML
    - DTML Basics (part 4)
    - DTML Basics (part 3)
    - DTML Basics (part 2)
    - DTML Basics (part 1)
    - Using Zope With Apache




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway