I read on
http://www.hmgforum.com/viewtopic.php?f=2&t=3533 that is born
HMG/WEB is a xBase web development tool based on Harbour compiler and jQuery Mobile.
HMG/WEB allows you to create web applications using traditional xBase syntax with added new commands.
The main goal of the project is to bring the simplicity and power of xBase to the web
On this release:
- new: List Dividers suppor for ListView. You must iniate the item with "\-"
- new: property 'AutoFocus' for Text, Number, TextArea, Currency, Date and Password.
- SetGlobal and GetGlobal functions to store and retrieve values when a session is active. Look at Session demo for details.
Syntax:
SetGlobal ( cName , xValue , cSessionId )
GetGlobal ( cName , cSessionId )
Download:
http://www.sourceforge.net/projects/hmgweb#include '
hmg.ch'
Function Main()
cText := getvalue( 'NextFunction' )
if len( alltrim( cText ) ) > 0
do( cText )
return nil
endif
Define Form Header 'This is a Header' Footer 'This is The Footer' Action 'hello.cgi'
// To make the link to the image file work, we must point it,
// to the server document root ('/') where it is located (apache/htdocs).
Define Image 'image_1'
Value '/hmg.jpg'
End Image
Define Text 'text_1'
Value 'this is another text!!!'
Label 'Input Text:'
End Text
Define Password 'pass_1'
Value '1234'
Label 'Password:'
End Password
Define Flip 'flip_1'
Value .T.
Label 'Flip!'
Options {'No','Yes'}
End Flip
Define Radio 'radio_1'
Label 'Radio:'
Options {'Moe','Larry','Curly'}
Default 1
End Radio
Define TextArea 'textarea_1'
Value 'This is a TextArea'
Label 'TextArea:'
End TextArea
Define Date 'date_1'
Value DATE()
Label 'Enter Date:'
End Date
Define Number 'num_1'
Min 1
Max 10
Value 5
Label 'Input Number (1-10):'
End Number
Define Select 'select_1'
Options {'One','Two','Three'}
Default 2
Label 'Select an Option:'
End Select
Define CheckBox 'check_1'
Value .T.
Label 'CheckBox!'
End CheckBox
Define Submit 'submit_1'
Value 'Send Form Data To Server'
End Submit
Define Reset 'reset_1'
Value 'Undo Changes'
End Reset
Define BackButton 'back_1'
Value 'Go Back!'
End BackButton
Define Text 'text_5'
Value cText
Label 'Input Text1:'
End Text
outstd('<input type="hidden" name="NextFunction" value=' + '"' + 'MyFunction' + '"' + '>' )
End Form
Return Nil
function MyFunction
Define Form Header 'Show Form Content' Footer 'This is The Footer'
Define Label 'label_1'
Value 'text_1:' + GetValue('text_1')
End Label
Break
Define Label 'label_2'
Value 'flip_1:' + GetValue('flip_1')
End Label
Break
Define Label 'label_3'
Value 'radio_1:' + GetValue('radio_1')
End Label
Break
Define Label 'label_4'
Value 'textarea_1:' + GetValue('textarea_1')
End Label
Break
Define Label 'label_5'
Value 'check_1:' + GetValue('check_1')
End Label
Break
Define Label 'label_6'
Value 'date_1:' + GetValue('date_1')
End Label
Break
Define Label 'label_7'
Value 'num_1:' + GetValue('num_1')
End Label
Break
Define Label 'label_8'
Value 'select_1:' + GetValue('select_1')
End Label
Break
Define Label 'label_9'
Value 'pass_1:' + GetValue('pass_1')
End Label
Break
Define BackButton 'back_1'
Value 'Go Back!'
End BackButton
End Form
return nil
Enjoy!
_________________
Regards/Saludos,
Roberto
--
Massimo Belgrano
Delta Informatica S.r.l. (Cliccami per scoprire )