Jump to content

Hayri ASLAN

Moderators
  • Posts

    1578
  • Joined

  • Last visited

  • Days Won

    134

Posts posted by Hayri ASLAN

  1. 14 hours ago, wjjw said:

    Hello,

    I have multiple uniGUI applications running on HyperServers.
    When you access first time/session on one app - e.g. app01 you need to login.
    There are links on app01 to the other apps using same DB (app02 and app03).
    If I click on this links while an existing valid session I don't want to login again.
    All user credentials are the same for all applications (app01-app03).

    What is the best and secure way/technique to do this? Cookies, parameters, ...?

    Best regards,
        /Werner

    I think the best way is cookies. 

    https://medium.com/swlh/secure-httponly-samesite-http-cookies-attributes-and-set-cookie-explained-fc3c753dfeb6

  2. 6 hours ago, William32 said:

    I am using trial for now 1.90.0.1553

    Hello

    Please try below code

    procedure TMainForm.UniButton18Click(Sender: TObject);
    begin
      with UniMap1, JSInterface do
      begin
        JSAssign('uniMap.options.crs', [JSStatement('L.CRS.Simple')]);
        JSCall('uniMap.setMaxBounds', [JSStatement('new L.LatLngBounds([0,500], [500,0])')]);
        UniSession.AddJS('var imageUrl = "http://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg";');
        UniSession.AddJS('var imageBounds = [[250,0], [0,250]];');
        UniSession.AddJS('L.imageOverlay(imageUrl, imageBounds).addTo('+JSName+'.uniMap);');
      end;
    end;

     

    • Like 1
  3. On 10/29/2021 at 11:00 AM, zhyhero said:

    For now ,I  add code to unimap.pas

    640  JSCallGlobal('L.map', [FMapJSName,
    641                           JSObject([
                                  'crs',JSStatement('L.CRS.Simple'), // config crs to simple for x,y mode
    642                              'center', JSArray([DefaultLat, DefaultLong]),
    643                             'zoom', DefaultZoom,
    644                              'id', -1,
    645                              'InternalId', NextInternalID,
    646                             'layers', JSArray([JSStatement(JSName+'uniLayer0')])
    647                            ])
    648                        ], FMapJSName);

     

    Any other way ?

    We will add SimpleCRS property to unimap.

  4. 4 minutes ago, William32 said:

    want to use fixed image as map but very big with zoom functionality and drawings

     

    Thanks

    Which version and build are you using?

  5. 1 minute ago, William32 said:

    Thanks. Actually I found I need to use very big image. So I need to display it in progressive mode , with zoom functionality and draw on it any resources ?

    Hi

    Do you want to add image to map or do you want to use an image as map?

  6. 15 hours ago, William32 said:

    Hi

    Is it possible to use unigui to draw on Maps ? any resources on that ?

    Hello

    Yes, you can draw polygon, circle, rectangle .. etc.

    Please check unimap - draw demo

    • Like 1
  7. 27 minutes ago, 55143681 said:

    My project runs well under XE10.3.3 cBuilder+UNIGUI 1551,

    But After I update to XE10.4.2+unigui 1553,

    I have a Linking error:

    Unable to open file 'UNIGUIMJSFORM.obj'

    In my project there is not any forms named UniGUIMJSform,

    why?

    2021-11-01_171421.png.d60970a4495ea0f2e195bc9608a904a2.png

     

     

    2021-11-02_072352.png.86da45757260206f4f949630bdc79e35.png

    Hello

    Please try with 1554 version.

  8. 25 minutes ago, picyka said:

     

    It almost worked, when you're on your cell phone, this method below doesn't work...

    UniSession.AddJS('window.open("https://api.whatsapp.com/send?phone=55' + lTelefone + '&text='+lTexto+'", "_blank");');

     

    from the desktop, it works.

    As window.open opens a new tab, you're calling window.open indirectly (from server side), not in direct response to a user event(tap event).

    Most browsers will block those calls. You should do your check inside tap event or you should use sync ajaxrequest.

    Please refer below post for Sync ajaxrequest.

     

  9. 1 hour ago, picyka said:

    I wanted that, before executing the method on the client, I would be able to execute any server.

     

    
    procedure TMainmForm.UnimButton1AjaxEvent(Sender: TComponent; EventName: string;
      Params: TUniStrings);
    begin
      if EventName='customTap' then
      begin
        UniSession.AddJS('window.open("https://api.whatsapp.com/send?phone=55123456", "_blank");')
      end;
    end;
    
    procedure TMainmForm.UnimFormCreate(Sender: TObject);
    begin
      with UnimButton1, JSInterface do
      begin
        JSAddListener('tap', JSFunction('ajaxRequest('+JSName+', "customTap")'))
      end;
    end;

     

  10. 31 minutes ago, picyka said:

    btnLinkAtendimento.JSInterface.JSAddListener('tap', 'function(sender, e, eOpts){window.open("https://api.whatsapp.com/send?phone=55' + lTelefone + '&text='+lTexto+'", "_blank")}');

     

    Good morning, I currently run a call on the client side like this, I would like that, before triggering the tap, I could execute the click on the server side, would that be possible?

    Hello

    Do you want to call window.open from serverside or just send an ajaxevent to server?

  11. 9 minutes ago, Zeljko said:

    I am blind near my own eyes. I have several applications on the same server running via hyperservers. All applications, except one, when looking at the task manager work as username SYSTEM except one which works as user LOCAL SERVICE. I made a mistake somewhere when setting up the app pool, but I couldn't find where. Please help 

     

    Hello

    Which version and build are you using?

    • Confused 1
  12. 11 minutes ago, İbrahim TELCİ said:

    Yanıtınız için teşekkür ederim. Zaten söylediğiniz demo uygulama üzerinden çalışıyorum. Terminate ettiğim zaman sayfa sonlanıyor. Ben sayfayı yeniden başlatmak istiyorum. Bu konu ile alakalı bir çözüm öneriniz var mı?

    Merhaba

    ServerModule.ServerMessages.TerminateTemplate i asagidaki gibi degistirebilirsiniz.

    <html>
    <meta http-equiv="refresh" content="0;url=[###url###]" />
    </html>

     

  13. 1 hour ago, İbrahim TELCİ said:

    TUniServerModule.UniGUIServerModuleException olayında bir hata yakalanır ise hata olan oturumun sayfasını yenilemek istiyorum. Uniapplication.Restart komutu bu işe yarıyor yalnız bunu ServerModule üzerinden kullanamadım. Nasıl yaparım. Bilgi verir iseniz sevinirim.

    Merhaba

    CustomException demosunu inceleyebilirsiniz.

    C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\CustomException

    (sender as TUniMainModule).Terminate; yapabilirsiniz.

     

  14. 5 hours ago, Bernie07 said:

    Hello,

    If I use the Forminstance for some things, UniGui show the form. But I haven't called the Show method. How can I prevent this.

    Example :

    sName := Form1.Name;

    This simple line shows the form. But you see, there is no Show method called like Form1.Show or Form1.ShowModal.

    Sometimes I only want return a property without showing the form. How can I do this?

    Best wishes

    Bernhard

    Hello

    If you create a form in UniGUI, the form will be displayed regardless.

    If you are using UniFrame you can set parent:= to nil. With this, that frame will not be displayed.

  15. 39 minutes ago, rayhildebrant said:

    Hello!

    When a set the  HTML property value (in the design time)  with a script, the script runs successfully:


            <script type="text/javascript">
              window.amplData = {
                email: 'teste@email.com.br', 
                 name: 'username', 
                survey: '60ef1fc0199741000e74244d',// This is your survey identifier
                callback: function(data){}
              }

    But, I need to set the script variables email and name in runtime with the user logger data.

    I tried to concatenate the values in HTML, text but the script does't work anymore.

    How may I do that ?

    tks.

    Hello

    Which build and version are you using?

  16. 1 hour ago, diegojmap said:

    I need to access a chome extension.

    I'm using beforeshow in ExtEvents.

    function window.beforeshow(sender, eOpts)
    {  
          var extensionId = "pnahlmehglnaomfnngekhphldmbjhdel";

                        chrome.runtime.sendMessage(extensionId, { message: "certs", body: "list certificates" }, function (response) {
                                                   console.log(response);
                        });
                    
       }

    Return the message:

    Cannot read properties of undefined (reading 'sendMessage')

    What would be the correct way to call it?

    Hello

    It seems "chrome.runtime" not ready yet. Can you try aftershow event?

  17. 36 minutes ago, Efrenis said:

    Hi,

    I think that is related to Unigui because using native delphi the code I posted before work, and just in Unigui doesn't work.

    I use the same component TFDMenTable in both cases..

    Thank.

    Hello

    Are you using professional version? Can you try with latest unigui version?

×
×
  • Create New...