I am trying to add custom button in my oracle application using html markup(java script) and when its been clicked it needs to invoke the rest api with parameters passed in the url
Below is the code i have written
<html>
<head/>
<style>
button#CallButton{
color: #000000;
border-color: #c4ced7;
background-color: #f1f3f3;
background-image: none;
border-radius: 3px;
border: 1px solid #c4ced7;
text-shadow: none;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 12px;
font-weight: bold;
min-height: 28px;
margin-right: 2px;
margin-left: 20px;
padding-left:6px;
padding-right:6px;
padding-botton:50px;
}
</style>
<body>
<button align="right" id="CallButton" onclick="(function(POid){var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
alert(this.responseText);
}};
var url = 'https://****************.integration.ocp.oraclecloud.com:443/ic/api/integration/v1/flows/rest/poststatus/1.0/poststatus?PO='+POid;
console.log('created url:::'+url );
xhttp.open('Post', url, true);
xhttp.setRequestHeader('Authorization', 'Basic ' + window.btoa('oicuser:OicPassword###'));
xhttp.send();})(917274);this.disabled=false;return false">Call PaaS Build</button>
</body>
</html>
Appreciate any help