HMGSCRIPT R017
Well... we are getting serious now...
After many tests and a light headache, I've concluded that the only way to make things easier is to complicate them a little
Definitively we must to use objects to simplify development and the use of the library.
It will be very easy since functions in JavaScript are objects already.
I've replaced the panel/query combination with a true browse object with its refresh method to retrieve and show data from the server.
It is extremely easy to use now, since I've successfully hidden the callback.
Code: Select all
BROWSE:
-------
Creates an HTML table inside a scrollable DIV, loaded with the specified dbf query.
Syntax:
Browse( cId, cParentId, nRow, nCol, nWidth, nHeight, cDbfFile, aColumns,
aHeaders , cForExpr , cOrder )
Methods:
refresh()
Notes:
- 'cId' is the id of the HTML table created (to be accessed via DOM).
- 'cParentId' is the Id of the parent window.
Example:
oBrowse = new Browse( 'browse1' ,
'win', 050 , 050 , 550 , 300 , '[test]' ,
'{ [code] , [first] , [last] , [birth] , [married] }' ,
'{ [Code] , [First] , [last] , [Birth] , [Married] }' ,
'[code < 100]' , '[code]' );
oBrowse.refresh()
Please take a look at the updated server demo.
All other widgets will follow the same path...