Jump to content

Frederick

uniGUI Subscriber
  • Posts

    608
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Frederick

  1. Thanks for the code. However, I am getting no response from the URL. Maybe, the URL just returns a string value and your code does nothing for it or like Sherzod mentioned, the code is not being executed or allowed to execute because of a blocked CORS policy?
  2. Thanks for the tip. The following code works for me:- idHttp:=TIdHttp.Create(NIL); try showmessage(idHttp.Get(<url>)); finally idHttp.Free; end;
  3. No. My objective is to call the URL, get a response value and save/use it. I am open to using any other method to achieve the result. Since I am using UniGUI, I thought of using its components first.
  4. No. I am running the application in my own computer (localhost) while the URL is a public web site.
  5. Here you go. -100 is displayed in the TUniURLFrame after I click the button. I would like to read this value. urlframe.7z
  6. Yes. UniFrame1.URL:='<url>'; and check event OnAjaxEvent.
  7. I set the URL property of a TUniURLFrame to a URL that returns a single value. The value can be seen in the TUniURLFrame. The following event is not fired. procedure TfrmShare.UniURLFrame1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin showmessage(params.Text); end; How do I read the value returned by the URL? -- Frederick (UniGUI Complete - Professional Edition 1.90.0.1562)
  8. My concurrent user count is about 10. The UniGUI application is not used frequently by users because it is just for downloading program patches. I am using VPS S and so far, I have not encountered downtime. Contabo was recommended by some users here and based on my research, its plans represent value for money compared to practically every other VPS provider I have looked at. This is based on VPS specifications. When I started with them, they only had servers in Germany. Now, they have servers in USA, UK and Singapore. My only concern is the long support response time. It can take Contabo 1 to 2 days to respond to a support email request. You can call them however, Since I have not had issues with the VPS so far, I am willing to live with this. Regardless of where your VPS is hosted, all support is still handled by their Germany office.
  9. Why do you not recommend Contabo for production? Aside from their slow support response times, their VPS has not gone done at all (touch wood) since I started using them 2 years ago.
  10. Hi Aggie85, I used the following code and it seems to work. MainForm.ClientEvents.ExtEvents -> function window.boxready(sender, width, height, eOpts) { document.getElementsByTagName('head')[0].childNodes.forEach(function(el){if (el.tagName=="STYLE" && el.innerHTML=="body {overflow-y: hidden !important;}") el.innerHTML=""}); Ext.getBody().setStyle('overflow', 'auto'); }
  11. I am receiving the following messages during compilation. Should I be concerned? If it is benign, how do I suppress them? [dcc64 Hint] uniGUIServer.pas(4114): H2443 Inline function 'DecodeString' has not been expanded because unit 'System.NetEncoding' is not specified in USES list [dcc64 Hint] uniGUIServerUtils.pas(851): H2443 Inline function 'DecodeString' has not been expanded because unit 'System.NetEncoding' is not specified in USES list [dcc64 Hint] uniGUIServerUtils.pas(891): H2443 Inline function 'EncodeString' has not been expanded because unit 'System.NetEncoding' is not specified in USES list Note: I do not want to suppress my own application's hint messages -- Frederick (UniGUI Complete - Professional Edition 1.90.0.1562)
  12. I am using version 1.90.0.1560 and this problem has still not been resolved?
  13. I have looked through the demos for layout management and I can't seem to find something that emulates the UniGUI forums when viewed in a web browser. You will see that there is no horizontal scrolling and only vertical scrolling. As the web browser is resized, everything resizes itself to fit into the web browser's viewport. How do I get my application to work like this?
  14. I am currently not doing any type of alignment but just creating the application like what I do in VCL. I will definitely look at the demo. Thanks.
  15. Thanks for your suggestion. I would prefer re-design the form myself because the form is already complete and displays well in a desktop but difficult to see on a mobile phone I have only 3 days to finish the makeover I have no time to learn a third party product as extensive as Radcore
  16. I write applications for the desktop but at times, I want to design a form (using desktop controls) that will fit within a mobile phone's screen, with vertical scrolling only. What is the best way to do this? Are there examples I can look at? -- Frederick (UniGUI Complete - Professional Edition 1.90.0.1560)
  17. In my ServerModule's OnHttpCommand event, will the calling server receive a 200 response code if set it without setting Handled=True? procedure TUniServerModule.UniGUIServerModuleHTTPCommand( ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo; var Handled: Boolean); begin AResponseInfo.ResponseNo:=200; // Handled:=True; end; I want to do this because I need to perform some extensive processing with the received parameters in the Main Form. Additionally, I see that there is a command for UniSession.AResponse.Responseno:=200 that can be used in a session. What does this do for the calling server? -- Frederick (UniGUI Complete - Professional Edition 1.90.0.1560)
  18. Thanks for the detailed explanations. I am clear now.
  19. I translated the CURL script at https://curlconverter.com/#javascript and the following was returned. fetch('https://www.mydom.com/api/v2/inv', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': 'Basic ' + btoa('somekey:') }, body: 'description=Some Payment' }); Does this look OK?
  20. Using the translator returns the following code:- var url = "https://www.mydom.com/api/v2/inv"; var xhr = new XMLHttpRequest(); xhr.open("POST", url); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function () { if (xhr.readyState === 4) { console.log(xhr.status); console.log(xhr.responseText); }}; var data = "description=Some Payment"; xhr.send(data); I suppose that the above code is to be inserted within a UniSession.AddJs() call. However, where has the "-u somekey:" gone to?
  21. I have the following CURL script which responds with a JSON string. curl https://www.mydom.com/api/v2/inv \ -u somekey: \ -d description="Some Payment" How do I translate the above to JS and where to I read the JSON string? -- Frederick (UniGUI Complete - Professional Edition 1.90.0.1560)
  22. Thank you for the detailed explanation. It would appear that the only way I can avoid purchasing multiple CALs in an office network is to host the UniGUI application in a public VPS. Would setting up a computer in the office as a cloud server and having users in the office and outside access it via a public IP address avoid the need to purchase multiple CALs as well?
  23. If I have a Windows Server Standard Edition installed in a server in a local area network and running a VCL application and 50 users want to access it, I need 50 CALs. If I use a UniGUI app from a VPS with Windows Server Datacenter, I don't seem to need to purchase 50 CALS if I have 50 users connected to the app. If I use a UniGUI app from a computer running Windows Server Standard Edition in a local area network, do I need to purchase 50 CALS if 50 users need to use it? -- Frederick (UniGUI Complete - Professional Edition 1.90.0.1560)
  24. Thanks for adjusted code. I wouldn't in a million years figured how to create it.
×
×
  • Create New...