zilav
-
Posts
573 -
Joined
-
Last visited
-
Days Won
44
Content Type
Profiles
Forums
Events
Posts posted by zilav
-
-
It is impossible to do that from server.
And include html as an image inside a report? Modern report generators have enough formatting features, you should rethink the logic of your app.
- 1
-
The easiest (but not the best) way is to create a hidden unilabel and store variable in its caption so you can access it in client browser.
The right way is to create your own "namespace" in javascript globals and store variables there with UniSession.AddJS(), something like this
window.MyVars = window.MyVars || {}; window.MyVars.Salary = 1000; ... function OnClick(sender, e) { if window.MyVars.Salary < 10000 then ...
-
I prefer to keep all visual components in frames, including main frame and login frame.
When the app starts I just show login frame first and switch to main frame on successful login. You can check MegaDemo how to handle frames.
-
Can you ping db server from web server?
-
Endusers will need only browser, all modern report systems work with web. Or you can always write your own report web service. I for example wrote ISAPI module using FastReport that gets template name and parameters from url and generates pdf. So when I need to print anything from my UniGUI apps, I just show an UniLabel with corresponding url, thats it. FastReport Server does exactly the same, but I found it much easier to write my own report server.
-
Are you joking? AddChild retuns TUniTreeNode, you can do what you want with it including data pointers.
-
This question is not about UniGUI. Just use any report generator with export to pdf, i.e. FastReport.
-
Tree.Items.AddChild
-
PD: I can't upload the files so .. here they are.
For rendering from TDataSet into TUniImage
Ok I admit... I was wrong. That is the worst piece of code for web
-
Don't forget to add some random value at the end of url like "image.jpg?3554356756756" so the image won't be loaded from browser's cache the next time it is refreshed.
-
I have used ShowImage Procedure in my BlobField demo project.
Jesus people, you are writing for a web browser. Just drop an image file somewhere and link to it with <img src=...> tag, thats all. Browser knows about image formats way more than you.
That ShowImage procedure is the worst piece of code for web. So much mess for doing so little.
It's only usefulness is when app needs to work with both web and VCL the same way. If it is not your aim, don't do that.
-
Wrap text in that column with appropriate CSS style in DataSet.OnGetText event, something like this
Value := '<span style="cursor: hand">' + Value + '</span>';
I wrote it from my head, check CSS reference for exact properties.
-
Time changes so fast... WebSockets technology now is mainstream (as other HTML5 features), supported nearly by all browsers be it mobile or desktop. There are quite a lot of online browser games using it and some interesting js libraries developing steadily
Nice list to check in general.
I don't know if ExtJS4 has anything to do with WebSockets, but adding it's magic to UniGUI can indeed provide some interesting functionality.
-
Replace canvas with TUniFileUpload
http://forums.unigui.com/index.php?/topic/2019-loading-unicanvas-and-native-canvas-to-db/
-
You can always use the ordinary TUniImage, since it is just a <img> tag in html.
Demo of showing jpeg images from database in TUniImage (and also uploading) http://forums.unigui.com/index.php?/topic/2019-loading-unicanvas-and-native-canvas-to-db/
-
Not only MesageDlg, but every other call that stops execution in VCL delphi (ShowMessage, ShowModal, etc) won't pause in UniGUI, so the code like
if MyForm.ShowModal = mrOk then begin // do something end;
will show a form, but won't wait for a ModalResult and just continue, so "do something" will never be executed. If you want to run a code according to ModalResult, use OnClose event of that form. It is the biggest difference with UniGUI and what caused almost a half of "bug" reports on forum in the past.
-
If you have some links in HTML that should open other forms, assign js onclick events on them and call AjaxRequest(), catch them in delphi on server side and do what you want.
If you want to open new forms as a pure html markup, then using unigui is not the best idea. I'd even say its the worst thing to do. Use common LAMP stack for that, or even write CGI/ISAPI in delphi without unigui.
-
-
Just replace the whole template with your html/javascript.
-
-
-
-
Create your own OnBeforePost handler function inside UniGUI form, and assign it in runtime to a DataSet. Don't forget to remove it (assign a nil) when the form is about to be destroyed, but DataSet is not.
-
Notification - this should be compatible with ExtJS4
Help needed with UniHTLMFrame.PaintTo
in General
Posted
I see what you try to achieve, but remote server taking a snapshot of client browser? Impossible.
You should make your report as a separate static html page (including google map), save it to a file, and then link it with UniLabel:
When user clicks this link, a new tab/window will open with your report and user can print it from browser.