Home    Cart    Free Download    Manual

Installation:
  Free Downloads
  The H2O Family
  Install Notes

Programming:
  Prerequisites
  H2O Whitepaper
  Online Manual
  Code Examples
  H2O Free Support


What's H2O?
H2O is programming made for the web.

What's it like?
H2O is English-like. If you know some Perl, VB, ASP, or PhP you'll be immediately productive in H2O. It runs on Linux, Mac, Unix, and Windows.

How do I try it?
Download H2O for free. Get it from hosting providers. Or buy on-line.

Where does H2O come from?
The language was invented by Aestiva. H2O stands for:
   HTML with
   HTML/OS
   Overlays.


Display CSV File (Sortable)

csv_view_sortable.html



<<

file_name="mydata.txt"
COPY FILE=file_name TS="," TO mydata /COPY
# table definition /#
col_names=ROW("Full Name","Start Date","Age")
col_types=ROW("Text","Date","Number")
col_initial_sorts=ROW("Y","Y","Y")
>>

<html>
<title>Report with Sortable Columns</title>
<<
# column sorting here /#
IF ISINTEGER(sort_col)="FALSE" THEN
sort_col=1
last_sort_col=0
/IF
IF sort_col != last_sort_col THEN
col_sorts = col_initial_sorts
/IF
IF col_types[sort_col]="NUMBER" THEN
IF col_sorts[sort_col]="Y" THEN
mydata=SORTCOLN(mydata,sort_col)
col_sorts[sort_col]="N"
ELSE
mydata=REVERSESORTCOLN(mydata,sort_col)
col_sorts[sort_col]="Y"
/IF
ELIF col_types[sort_col]="DATE" THEN
IF col_sorts[sort_col]="Y" THEN
mydata=SORTCOLD(mydata,sort_col)
col_sorts[sort_col]="N"
ELSE
mydata=REVERSESORTCOLD(mydata,sort_col)
col_sorts[sort_col]="Y"
/IF
ELSE
IF col_sorts[sort_col]="Y" THEN
mydata=SORTCOL(mydata,sort_col)
col_sorts[sort_col]="N"
ELSE
mydata=REVERSESORTCOL(mydata,sort_col)
col_sorts[sort_col]="Y"
/IF
/IF
last_sort_col=sort_col
>>

<table border=0><tr bgcolor=#CECECE>
<< j=COLS(col_names)
FOR NAME=i VALUE=1 TO j DO
DISPLAY
'<td><b><a href='+page+' NAME=sort_col value="'+i+'">'+
col_names[i]+'</a></b></td>'
/DISPLAY
/FOR

>></tr>
<<
FOR NAME=mydata ROWNAME=mylineitem DO
DISPLAY "<tr>" /DISPLAY
FOR NAME=i VALUE=1 TO j DO
DISPLAY "<td>"+mylineitem[i]+"</td>" /DISPLAY
/FOR
DISPLAY "</tr>" /DISPLAY
/FOR
>>

</table>
</html>


Home | Cart | Free Download | Online Manual
COPYRIGHT © 2005 Aestiva, LLC. ALL RIGHTS RESERVED.