I'm thinking about the possibility of calling PB code from a website hosted in IIS.
Is it possible to use the AJAX method to call PB code?
AJAX is based on a browser function that works similar to the PB function GetURL. Javascript code passes input variables in the URL and a server script runs in the background. When the server side script finishes, it passes the output to a Javascript function specified in the initial call. The assumption is that the output is in XML format but technically it could be any format that the Javascript in your web page can understand.
I would likely be doing this in Classic ASP which consists of hand coded HTML & Javascript on the front end and VBScript on the backend.
I did some research and to call .Net from Classic ASP VBScript it has to be a registered COM object.
The Javascript can AJAX call a small VBScript file on the server that calls the COM object function and returns the result to the browser.
Can you create a .Net Assembly from PB that is COM without a bunch of work arounds?
http://www.c-sharpcorner.com/UploadFile/rohatash/calling-wcf-services-us...
here's the important code:
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: 'Service.svc/GetData',
success: function (data) {
$($.parseJSON(data.d)).each(function (index, value) {
$("#TableID").append("" + value.Name + "" + value.LastName + "" + value.Email + "");
});
},
error: function (result) {
alert(result);
}
});