Jump to content

Hide Parameter


clement

Recommended Posts

19 minutes ago, Frederick said:

The problem is not specified to any payment gateway.

If I call a URL address like https://www.somedomain.com/?userID=fred&password=mypass, I want the parameters to be hidden (this is achieved by Sherzod's JS code) and I want this URL address to appear in place of my application.

Ok, now I understand the problem.

Thank You.

Link to comment
Share on other sites

In HTML I use:

<script> 
    function updateURL() {
      if (history.pushState) {
          var newurl = window.location.protocol + "//myurl.com";
          window.history.pushState({path:newurl},'',newurl);
      }
    }
</script>

 

and in the "body"-part: 

<body onload="updateURL();">

This always shows only your URL ("myurl.com").

  • Thanks 1
Link to comment
Share on other sites

2 hours ago, Frederick said:

How do I implement the above in a button click with parameter passing of hidden variables?

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

On 12/12/2021 at 12:51 PM, likemike said:

In HTML I use:

<script> 
    function updateURL() {
      if (history.pushState) {
          var newurl = window.location.protocol + "//myurl.com";
          window.history.pushState({path:newurl},'',newurl);
      }
    }
</script>

 

and in the "body"-part: 

<body onload="updateURL();">

This always shows only your URL ("myurl.com").

Hello, Can You try to apply this example with "url = https://google.com", did You will get same Ajax Error ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...