Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 98,319
» Latest member: teethsoftgersubt1981
» Forum threads: 2,426
» Forum posts: 11,371

Full Statistics

Online Users
There are currently 1546 online users.
» 0 Member(s) | 1543 Guest(s)
Applebot, Bing, Google

Latest Threads
WebApplication.IP change ...
Forum: IntraWeb General Discussion
Last Post: MJS@mjs.us
09-11-2026, 09:49 PM
» Replies: 1
» Views: 212
Hook/callback to handle t...
Forum: IntraWeb General Discussion
Last Post: Lenfors
09-08-2026, 09:03 AM
» Replies: 0
» Views: 166
Reproducible IIS crash in...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
09-08-2026, 01:48 AM
» Replies: 0
» Views: 180
The packages IW16.xx inc...
Forum: IntraWeb General Discussion
Last Post: hsbelli
09-03-2026, 11:46 AM
» Replies: 2
» Views: 487
Redirection issues with F...
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 10:03 AM
» Replies: 0
» Views: 251
Source Code
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 08:11 AM
» Replies: 3
» Views: 656
TContenthandler requires ...
Forum: IntraWeb General Discussion
Last Post: valmeras
08-30-2026, 02:35 AM
» Replies: 0
» Views: 230
TIWjQDBGrid erratic behav...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
08-20-2026, 05:12 PM
» Replies: 8
» Views: 2,259
Change Language DataTable
Forum: IntraWeb General Discussion
Last Post: Rigoberto Mercedes
08-19-2026, 03:21 PM
» Replies: 1
» Views: 368
How to terminate HTTP Thr...
Forum: Indy
Last Post: rlebeau
08-14-2026, 08:01 AM
» Replies: 5
» Views: 995

 
  HTTP/TCPServer Intercept
Posted by: kbriggs - 05-05-2022, 05:33 PM - Forum: Indy - Replies (1)

I'm setting up intercepts like this in my OnConnect events to track total bytes coming in and going out:

Code:
AContext.Connection.Intercept := TIdConnectionIntercept.Create(AContext.Connection);  // track total bytes in and out
AContext.Connection.Intercept.OnReceive := InterceptEvents.OnReceive;
AContext.Connection.Intercept.OnSend := InterceptEvents.OnSend;

Do I need to call AContext.Connection.Intercept.Free in the OnDisconnect event or does that get cleaned up automatically when the connection ends?

Print this item

  TIWModalWindow
Posted by: Lorbass - 05-05-2022, 08:33 AM - Forum: IntraWeb General Discussion - Replies (5)

Hi @all

Is it possible to open two modal windows nested?

Scenario:
The main page (TIWAppForm) contains a button to open a modal window (dialog 1).

In this modal window is another button to open another modal window (dialog 2).

Both modal windows should be visible.

What is the trick or is it not possible?


Thanks in advance for an appropriate answer!

Print this item

  Paypal JS SDK API
Posted by: Anto90 - 05-04-2022, 03:52 PM - Forum: IntraWeb General Discussion - Replies (4)

Hi at all,
i have integrated paypal javascript api in intraweb and this is the code on OnApprove Payment

onApprove: function(data, actions) {    ' + sLineBreak +
                '  $.busyLoadSetup({ fontawesome: "fa fa-spinner fa-spin fa-5x fa-fw" }); $.busyLoadFull("show"); ' + sLineBreak +
                '  return actions.order.capture().then(function(orderData) {  ' + sLineBreak +
                '  // dettaglio di risposta ' + sLineBreak +
                '    addHiddenInput("JSONRESPONSE",JSON.stringify(orderData, null, 2));    ' + sLineBreak +
                '    ajaxCall("JsonPayPalResponse","&TipoAbbonamento='+ TipoAbbonamento.ToString +'",false); //abbonamento personale ' + sLineBreak +
                '    });                  ' + sLineBreak +
                '  },  ' + sLineBreak +


(AggiungiLog add log a table to get state of payment)
I use an hidden input to capture json and then i pass it to callback.
I use 2 callback 1 is

procedure TBSNuovoPagamentoPaypalForm.JsonPayPalResponse(EventParams: TStringList);
var
  js      : string;
  TipoAbb : string;
  dm      : TMod1;
  jsCall  : string;
begin
  TipoAbb := EventParams.Values['TipoAbbonamento'];
  //salvo il log della response
 
  js := Format('addHiddenInput("%s",%s);', ['JSONTOELAB', 'document.getElementsByName("JSONRESPONSE")[0].value']);
  jsCall := ' ajaxCall("ElaboraPagamentiDaJson","&TipoAbbonamento='+TipoAbb+'",false);';
  js := js + jsCall;
  //cambiato su un'unica chiamata
  WebApplication.CallBackResponse.AddJavaScriptToExecuteAsCDATA(js);
end;


and the other is to get the hidden input value

procedure TBSNuovoPagamentoPaypalForm.ElaboraPagamentiDaJson(EventParams: TStringList);
var
  JSonProcess              : string;
  TipoPagamento            : string;
  JSonObject              : TJSONObject;
  JSonValueCompleted      : TJSonValue;
  JSonValueId              : TJSonValue;
  Abbonamento              : string;
  dm                      : TMod1;
begin
  JSonProcess := EventParams.Values['JSONTOELAB'];
  TipoPagamento := EventParams.Values['TipoAbbonamento'];
  JSonObject := nil;
  dm := LockDataModule();
  try
    dm.AggiungiLog('Risposta json server paypal',Copy(JSonProcess,1,3000));
    JSonObject := TJSONObject.ParseJSONValue(TEncoding.UTF8.GetBytes(JSonProcess), 0) as TJSONObject;

    if JSonObject = nil then
    begin
      WebApplication.ShowMessage('Errore nella decodifica di risposta del server Paypal.com');
      dm.AggiungiLog('Errore decodifica json paypal','ElaboraPagamentiDaJson JSonObject nil');
      Exit;
    end;

    JSonValueCompleted := JSonObject.GetValue('status');
    JSonValueId := JSonObject.GetValue('id');
    if (UpperCase(JSonValueCompleted.Value) = 'COMPLETED') and (JSonValueId.Value <> '')  then
    begin
      //pagamento completato e posso procedere con generazione fattura e abilitazione utente
      IWTimer1.ExtraTagParams.AddPair('TipoAbbonamento',TipoPagamento);
      IWTimer1.ExtraTagParams.AddPair('IDPAGAMENTO',JSonValueId.Value);
      if TipoPagamento = CODABBINPS.ToString then //per abbonamento comunicazioni inps.
        IWTimer1.ExtraTagParams.AddPair('Datore',CodDatore.ToString);
      BSDialogoAttesa.ModalVisible := True;
      IWTimer1.Enabled := True;
    end;

  finally
    if Assigned(JSonObject) then
      JSonObject.Free;
    UnlockDataModule(dm);
    WebApplication.CallBackResponse.AddJavaScriptToExecute('$.busyLoadFull("hide");');
  end;
end;

with JavaScript do // creo hidden input per il ritorno del valore funzione javascript
begin
    Add('function addHiddenInput(aName,aValue) {');
    Add('  var frm = $(getSubmitForm());');
    Add('  if (!frm.length) return false;');
    Add('  var hid = frm.find("input[name=\"" + aName + "\"]");');
    Add('  if (!hid.length) {');
    Add('    hid = $("<input type=\"hidden\" name =\"" + aName + "\">");');
    Add('    frm.append(hid);');
    Add('  }');
    Add('  hid.val(aValue);');
    Add('  AddChangedControl(aName);');
    Add('}');
    Add('');
 end;

Then the timer excute code to activate the service to user with a busy modal dialog 

Sometimes callback JsonPayPalResponse does not fire. In paypal i have the payment in status complete and response ok but in the OnApprove can't fire the callback to activate the service for the user.
In sandbox and test case i can't reproduce the issue but some user can't activate. I open a ticket on paypal and the order is correctly captured with json response ok.
The calls to paypal are javascript based on documentation that you can find here https://developer.paypal.com/sdk/js/configuration/

Is the right way to process jSon that come from paypal onApprove callback?

Thank you

Andrea

Print this item

  jQGrid css and js files
Posted by: Comograma - 05-04-2022, 02:35 PM - Forum: IntraWeb General Discussion - Replies (7)

Where can I have access to the latest file version for components jQDBGridg and jQGrid, css files ans js files ?

Print this item

  IWjQDBGrid column auto width
Posted by: Comograma - 05-02-2022, 04:52 PM - Forum: IntraWeb General Discussion - Replies (3)

I have a IWjQDBGrid component with goAutoGridWidth and goAutoColumnWidth set to True but this doesn't work.
How can I put this to work? Either I have a column with 2 or 3 characters and a column too large or a string with several characters that do wrap when it shouldn't, because too much width is wasted with the short column.

Print this item

  Form background color
Posted by: Comograma - 05-02-2022, 11:15 AM - Forum: IntraWeb General Discussion - Replies (1)

How can I change/set the form's background color?
If I change Form.BGColor to anything, it doesn't do nothing.

I know I can set a region's BSBackground to something different than bsrbDefault and it will change the color, but not the hole background color for parent form, height, at least.

How can I do this?

Print this item

  Images streaming using Indy client side
Posted by: Ahmed Sayed - 04-29-2022, 08:27 AM - Forum: Indy - Replies (12)

Hi,
I found this thread about images streaming from a camera and it was really good but I can't find any example on how to handle this on the client side for the Server push example:

https://stackoverflow.com/questions/2565...ttp-server

Any ideas on how to handle client side in C++ builder code not Delphi?

Print this item

  IntraWeb 15.2.54 is out!
Posted by: Alexandre Machado - 04-29-2022, 07:34 AM - Forum: IntraWeb General Discussion - No Replies

Hey guys,

there is a new IntraWeb update available:

https://www.atozed.com/2022/04/intraweb-15-2-54/


Enjoy!  Big Grin

Print this item

Question IntraWeb, Excel and MySQL
Posted by: raulevm - 04-29-2022, 03:07 AM - Forum: IntraWeb General Discussion - Replies (1)

Dear, what is the correct way to read an excel file with IntraWeb? I could only use IWFileUploader but now I need to import excel data to MySQL using DataSet. I can do it through Delphi but in IntraWeb I have had problems with COM support, I have not been able to create OLE objects for this purpose. I would like to know if there is another way to do it. Thanks in advance

Print this item

  Indy 10 version of IdPeerThread.stop
Posted by: dataspiller - 04-28-2022, 10:31 PM - Forum: Indy - Replies (3)

Good afternoon

I'm in the process of updating an old delphi program to run on Delphi 10.4 - it uses an old version of Indy - thinking at least indy 8.

I have been able to find resources on most of the changes needed to be made to make it work with indy 10.

Except so far one.

IdPeerThread.Stop  - I know IdPeerThread has been replaced with IdContext.

But I don't know what IdPeerThread.Stop does to know what procedure to IdContext replaced it with.

I have tried finding the source code, getting hold of indy 9 documentation hoping it would cover the changes.

Any tips?


Thanks,

Seth

Print this item