PDA

View Full Version : Thead alignment / example code design pattern to rent an object



jop_008
6 May 2012, 1:02 AM
Hi,

I have the following layout <table><thead></thead><tbody></tbody><table>

I have it like this
'<thead align="center"><tr><th align="center">Weeknr</th><th>Prijs</th><th align="center">Status</th></tr></thead>'+

The problem is that the heading cells are not centered but left aligned.

I have it in a calendar with weeknr, data, price, status (free, option, booked)
What is the best way to set this up? With an array and some render code to create the HTML table?
Or just like I have now with a large HTML page. Each <tr> is a weeknr.
People book the object and the HTML table is updated manually.

In a later stage of the app I want to book the house from within the app as well.

Like this. Press book => with 4 buttons (period, ID, add person, options)

Period: From date End date (all saturdays are possible). What is the best way to do this? Use a free field and check if the date is on saturday? Show all saturdays in a listbox?
ID: Enter the id of the main renter (name, birth date, email1,2 telephone number1,2, bank accout)
Add Person: Add persons (name, birth date). With a maximum of 5 persons.
Options : Sauna, child package, child chair
Based on the number of persons and their age the price of the booking can be calculated.
If the action is complete send an email with all the information (launch the mail app and in the body text the information)
In a later stage I want to send the mail with PHP on the server site and update the calendar information with reading a database.

Do you know a design pattern for this or some example of booking an object. It must be done before :)
Booking an object with price calculation.

Thanks in advance,

John