Hello,
I try to make a own HTML output from a getlist for my webinterface. I know DRCREAD HTML, but need some special things because I use Metro UI. I am actually successful with says, gets and buttons. Actually I have two problems.
I make a dialog with DCREAD GUI EXIT SAVE, destroy the dialog object and parse the getlist. But the dialog flashes when creating, can I avoid this ? I need it working like DCREAD HTML .
The second problem is getting the arry from a DCLISTBOX with the values, I would like to make a HTML select with this values, where in the getlist I can find it ?
regards
Rudolf
Getlist listbox array
Re: Getlist listbox array
DCGETOPTONS HIDEBut the dialog flashes when creating, can I avoid this ?
That is stored in element 31 of the Getlist ( bGETLIST_REFVAR )The second problem is getting the arry from a DCLISTBOX with the values,
nElement := AScan( GetList, {|a|a[nGETLIST_TYPE] == GETLIST_LISTBOX})
aList := Getlist[ nElement, bGETLIST_REFVAR )
IF Valtype(aList) == 'B'
aList := Eval(aList)
ENDIF
The eXpress train is coming - and it has more cars.
Re: Getlist listbox array
Hello Roger,
thank you, works great now. I can now convert some important controls from the getlist array to HTML like you do it with DCREAD DCHTML with absolut positioning the controls. Attached some screenshots from my XB2NET webserver with eXpress++ UI and source and HTML result. The function that converts a getlist to HTML has only a few lines of code, so it is again fascinating what is possible with eXpress++. The next step is to integrate a table control with jquery datatables and parsing DCBROWSE in a getlist. I think here I will need your help again.
regards
Rudolf
thank you, works great now. I can now convert some important controls from the getlist array to HTML like you do it with DCREAD DCHTML with absolut positioning the controls. Attached some screenshots from my XB2NET webserver with eXpress++ UI and source and HTML result. The function that converts a getlist to HTML has only a few lines of code, so it is again fascinating what is possible with eXpress++. The next step is to integrate a table control with jquery datatables and parsing DCBROWSE in a getlist. I think here I will need your help again.
regards
Rudolf
- Attachments
-
- 2017-04-20_08h48_33.png (58.01 KiB) Viewed 21159 times
-
- 2017-04-20_08h49_00.png (58.88 KiB) Viewed 21159 times
-
- 2017-04-20_08h47_20.png (34.9 KiB) Viewed 21159 times
Re: Getlist listbox array
Hi Rudolf,
This looks great.
Is your parsegetlist() function using DC_ReadHtml()?
This looks great.
Is your parsegetlist() function using DC_ReadHtml()?
Re: Getlist listbox array
Hello,
fist step with browser
regards
Rudolf
fist step with browser
regards
Rudolf
- Attachments
-
- 2017-04-20_10h05_13.png (79.55 KiB) Viewed 21158 times
-
- 2017-04-20_10h04_58.png (49.68 KiB) Viewed 21158 times
Re: Getlist listbox array
Rudolf -
That is an interesting technique for generating HTML code.
It would not have occurred to me to go in that direction.
What are you doing with the result?
Are you using DCHTMLVIEWER to display it in a web browser?
I have added a new command: DCHTMLWINDOW in build 265.
This is a much lighter HTML viewer.
I am using it in a wizard.
That is an interesting technique for generating HTML code.
It would not have occurred to me to go in that direction.
What are you doing with the result?
Are you using DCHTMLVIEWER to display it in a web browser?
I have added a new command: DCHTMLWINDOW in build 265.
This is a much lighter HTML viewer.
I am using it in a wizard.
The eXpress train is coming - and it has more cars.
Re: Getlist listbox array
Hello Roger,
I use it for my special webserver with XB2NET, but the resulting code you can use for all things that are using HTML. It is also easy to transfer the code to jquery mobile. So I could check the browser settings to see which interface I build for the response to the browser. With Javascript it is also possible to translate other things from eXpress++ to HTML code, I have also successfull implemented xmlhttprequest for some things like updating tables after editing. I think you could help to make much more from this basics, so no problem to send you the code. I have also a generic interface to fill the fields and tables with SQL querys or DBF tables and read the result back to the application. For me the Metro UI has a very nice GUI, but the dialogs can also use any other Javascript lib for building dialogs. The really complicated things were the Javascript things, but I think I have most of the problems solved.
regards
Rudolf
I use it for my special webserver with XB2NET, but the resulting code you can use for all things that are using HTML. It is also easy to transfer the code to jquery mobile. So I could check the browser settings to see which interface I build for the response to the browser. With Javascript it is also possible to translate other things from eXpress++ to HTML code, I have also successfull implemented xmlhttprequest for some things like updating tables after editing. I think you could help to make much more from this basics, so no problem to send you the code. I have also a generic interface to fill the fields and tables with SQL querys or DBF tables and read the result back to the application. For me the Metro UI has a very nice GUI, but the dialogs can also use any other Javascript lib for building dialogs. The really complicated things were the Javascript things, but I think I have most of the problems solved.
regards
Rudolf
Re: Getlist listbox array
Hi Rudolf, Roger,
It looks as Rudolf found the way to create xbase applications for the web.
- Easy to create the screens for each Xbase programmer.
- Updating the tables after editing.
Using it in combination with DCHTMLWINDOW can maybe result in a desktop application with the modern look of a webapplication? This could be the most important Xbase++ step of the last decade.
The base of this is already in eXPress for at least 10 years. It looks as nobody was aware of the power of this. We were (and still are) waiting for Alaska, and didn't realise that we had it under the hood of eXPress++.
I'm interested in this technique.
It looks as Rudolf found the way to create xbase applications for the web.

- Easy to create the screens for each Xbase programmer.
- Updating the tables after editing.
Using it in combination with DCHTMLWINDOW can maybe result in a desktop application with the modern look of a webapplication? This could be the most important Xbase++ step of the last decade.
The base of this is already in eXPress for at least 10 years. It looks as nobody was aware of the power of this. We were (and still are) waiting for Alaska, and didn't realise that we had it under the hood of eXPress++.
I'm interested in this technique.
Re: Getlist listbox array
Hello Chris,
eXpress++ is perfect for such things. The method with the getlists has a lot of possibilities for interesting addons. I have added now some more controls like switch style checkboxes, edit and delete icons in the browser, browse editing in a separate window etc. It is also possible to add menus and tabpages from the getlist, but the most complicated thing is the session handling, I have to take care about all datasources and record pointers in the sessions. I have solved much things, but still a lot of work to make it perfect. This needs a Javascript profi.
regards
Rudolf
eXpress++ is perfect for such things. The method with the getlists has a lot of possibilities for interesting addons. I have added now some more controls like switch style checkboxes, edit and delete icons in the browser, browse editing in a separate window etc. It is also possible to add menus and tabpages from the getlist, but the most complicated thing is the session handling, I have to take care about all datasources and record pointers in the sessions. I have solved much things, but still a lot of work to make it perfect. This needs a Javascript profi.
regards
Rudolf
Re: Getlist listbox array
Hi,
Yes, session handling and record pointers are not so easy. We have a system which is using hidden vars in the html. When we create the html file, we add some extra info.
So after an edit, we know which record we have to update. Our problem is the creation of the screen that takes too much time. If we could do this in Xbase++ it would make it easier.
Yes, session handling and record pointers are not so easy. We have a system which is using hidden vars in the html. When we create the html file, we add some extra info.
Code: Select all
<input name="_SID" type=hidden value="_ID_" />
<input name="file" type=hidden value="klant" />
<input name="parent" type=hidden value="<[str(klant->(recno()))]>" />
<input name="record" type=hidden value="<[str(klant->(recno()))]>" />
<input type="hidden" name="scope" value="_SCOPE_" />