Jump to content

Frederick

uniGUI Subscriber
  • Posts

    608
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Frederick

  1. 18 minutes ago, Norm said:

    As far as I know there is no way of circumventing VPN use. I would be very interested to know if I'm wrong.

    I feel that it would not be possible to block a user from a different country once they use a VPN because you are trying to block them by their IP address, which can be spoofed.

  2. 1 hour ago, irigsoft said:

    Good question, but if it uses a VPN, it means that this user has default connectivity rights. (VPN connection to the server is activated)

    Let's say that I am from ABC country and you are located in XYZ country. Using a VPN, I can set it such that I am from XYZ country. How do you block me since my IP address would show that I am from your home country?

  3. Thanks. I did see this page but was not sure how to add it in the following JS code:-

    procedure TMainForm.UniButton1Click(Sender: TObject);
    begin
      UniSession.AddJS(
        'var f = document.createElement("form"); '+
        'f.action="http://localhost:8077/"; '+ // the second app url
        'f.method="POST"; f.setAttribute("target", "view");'+

        'var i=document.createElement("input"); '+ // Param1
        'i.type="hidden"; '+
        'i.name="param1"; '+
        'i.value="Test"; '+
        'f.appendChild(i); '+

        'document.body.appendChild(f); '+
        'window.open("", "view"); f.submit(); '
      );
    end;

  4. When I open a web site in Firefox (using the following code) and its popup windows blocker is enabled, the site cannot be reached.

    UniSession.AddJS('open("www.google.com", "_blank")');

    Is there a way to disable the popup blocker by code so that the site can be called?

    I tried the following code in the MainForm.UniFormShow event but there is no effect:-

    procedure TMainForm.UniFormShow(Sender: TObject);
    begin
      Caption := UniApplication.Parameters.Values['param1'];
    end;

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1555)

  5. 29 minutes ago, Sherzod said:

    Hello,

    What kind of application, deployment? What theme are you using? Are additional themes installed on the server?

    The problem is because I am using the Uni_Flat_Black theme and the dropdown arrow is there but not displayed. Even the messagedlg() procedure does not display the Close button. If I change the theme to Classic, both the dropdown arrow for the TUniComboBox and the Close icon for the messagedlg() procedure are displayed.

    I have checked the server and the theme for Uni_Flat_Black is installed.

    It could be the runtime installation files for themes are not the same as the development install.

    tunicomboboxtheme.png

    messagedlg.png

  6. I have a TuniComboBox which is populated via a query at runtime. When the application is run locally, the dropdown arrow is visible and I can select the available items.

    However, when the same application is run over the Internet, the dropdown arrow is missing and I cannot perform a selection.

    The number of items in the TuniComboBox, as seen in the screenshot, is the same at 26 whether run locally or remotely.

    What am I missing here?

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1555)
     

    tunicombobox.png

  7. 11 minutes ago, irigsoft said:

    Yes, by security reasons.

    My last example (the link above) shows the execution of code and parameters without changing the url, only that.

    Noted, thanks.

  8. 5 hours ago, irigsoft said:

    Maybe this will help: https://reqbin.com/req/javascript/uzf79ewc/javascript-post-request-example

    I have used this to communicate from my uniGui application (in Browser) to other Android application (server) on device.

    I do have the JS code to pass hidden variables as provided by Sherzod and it works fine. It is just that, the URL it calls is shown in a separate tab. I think that it is not doable since Sherzod has not provided a solution.

  9. 45 minutes ago, irigsoft said:

    @Frederick,

    can I ask you why you need to load google.com into your URL?
    What exactly needs to be achieved?

    maybe XMLHttpRequest will be better or use iFrame in your page.

    The Google URL address is just an example only. The main objective is to load any web site in the same tab as my application. The real target URL is a payment gateway.

    Essentially, when I click the button, my application closes and the new URL address appears in the same tab.

    I thought more of this and if the JS code is meant to do a POST of parameters to a URL address, it may not be possible to have it appear in the same tab as my application.

  10. 2 minutes ago, irigsoft said:

    maybe that's the reason, but if you try Sherzog's example, it will happen too.

    Surprisingly, Sherzod's example does not cause any problems and works fine except that I want the new URL to appear in my application's tab.

  11. 46 minutes ago, irigsoft said:

    Okay, I'll tell you how I did to make this work in my application:

    I open a url with parameters and after logging in these parameters disappear.

    procedure TMainForm.UniFormActivate(Sender: TObject);

    var
        newURL        : String;
    begin

         newURL := 'https://www.google.com'

         UniSession.AddJS(
                // Current URL: UniSession.ARequest.Referer
                'const nextURL = ''' + newURL + ''';'
                + 'const nextTitle = ''' + UniServerModule.Title + ''';'
                + 'const nextState = { additionalInformation: ''Updated'' };'
                // This will create a new entry in the browser's history, without reloading
                + 'window.history.pushState(nextState, nextTitle, nextURL);'
                // This will replace the current entry in the browser's history, without reloading
                + 'window.history.replaceState(nextState, nextTitle, nextURL);'
                );

    end;

    I tried this but the web browser throws an Ajax error and says that "the operation is insecure".

×
×
  • Create New...