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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 107,035
» Latest member: huvipink1
» Forum threads: 2,438
» Forum posts: 11,403

Full Statistics

Online Users
There are currently 1595 online users.
» 1 Member(s) | 1591 Guest(s)
Applebot, Bing, Google, huvipink1

Latest Threads
Strict CSP Implementation
Forum: IntraWeb General Discussion
Last Post: Mario Villalba
10-29-2026, 06:32 PM
» Replies: 0
» Views: 65
Form doesn’t resize with ...
Forum: IntraWeb General Discussion
Last Post: BathDragonfly
10-29-2026, 09:48 AM
» Replies: 0
» Views: 58
Rerendering CG Tab Contro...
Forum: IntraWeb General Discussion
Last Post: MikeComb
10-29-2026, 07:38 AM
» Replies: 5
» Views: 497
Simply replacing the IW i...
Forum: IntraWeb General Discussion
Last Post: DidierMenant
10-28-2026, 10:31 AM
» Replies: 0
» Views: 140
Simply replacing the IW i...
Forum: IntraWeb General Discussion
Last Post: DidierMenant
10-28-2026, 10:30 AM
» Replies: 0
» Views: 132
IWDevTools
Forum: IntraWeb General Discussion
Last Post: AndreasK
10-26-2026, 01:19 PM
» Replies: 0
» Views: 161
SSL Revisited
Forum: IntraWeb General Discussion
Last Post: rlebeau
10-19-2026, 09:24 PM
» Replies: 3
» Views: 737
SpinBox Button Size
Forum: IntraWeb General Discussion
Last Post: MikeComb
10-19-2026, 06:12 PM
» Replies: 0
» Views: 285
CSS in CGDevTools
Forum: IntraWeb General Discussion
Last Post: MikeComb
10-13-2026, 04:12 PM
» Replies: 2
» Views: 731
Help with TIWPaintBox
Forum: IntraWeb General Discussion
Last Post: EmoPal
10-13-2026, 08:44 AM
» Replies: 0
» Views: 415

 
  How To Get Value From JavaScript!
Posted by: ShaneStump - 03-03-2019, 01:07 AM - Forum: IntraWeb General Discussion - Replies (13)

Howdy All!

I have a third party javascript component that attaches itself to a an Input control (say TIWBSInput for example). The component will update the text value of attached input control if the user changes anything.

As soon as the Text field of the TIWBSInput field is updated, I need to update a few other variables. The SetText method is virtual and I have modified it to no avail.

None of the AsyncChange, etc get called of the TIWBSInput.

So here is my question: since the Text of the TIWBSInput is obviously getting updated, how can I get notified when it does?

Thanks in advance,

Shane

Print this item

  problem with post methos https - URGENT
Posted by: staff@ergosoft.it - 03-01-2019, 09:48 PM - Forum: Indy - Replies (2)

Hi,

I have this function 

function TFDMFE.EncodeFile(const FileName: string): AnsiString;
var
  stream: TMemoryStream;
begin
    stream := TMemoryStream.Create;
    try
      stream.LoadFromFile(filename);
      result := EncodeBase64(stream.Memory, stream.Size);
    finally
         FreeAndNil(stream);
    end;
end;

procedure TFDMFE.InviaFE(Autorizzazione, PercorsoFileXML, Credenziali, Dominio : string);
var
 lHTTP: TIdHTTP;
 lParamList: TStringList;
 Comando, RisultatoPost : string;
begin
   //************ COMANDO HTTP ********
   Comando := 'https://ws.fatturazioneelettronica.aruba.it/services/invoice/upload';
   //**********************************

   lParamList := TStringList.Create;

   Credenziali := '""';
   Dominio := '""';

   try
     lParamList.Add('"dataFile":"'+EncodeFile(PercorsoFileXML)+'"');
     lParamList.Add('"credential":'+Credenziali); // vuoti
     lParamList.Add('"domain":'+Dominio);     // vuoti

     lHTTP := TIdHTTP.Create;
     try
        lHTTP.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(lHTTP);
        lHTTP.HandleRedirects := True;
        lHTTP.Request.CustomHeaders.FoldLines := False;
        lHTTP.Request.Accept := 'application/json';
        lHTTP.Request.CustomHeaders.Add('Authorization:Bearer ' + Autorizzazione);
        lHTTP.Request.ContentType := 'application/json';
        lHTTP.Request.CharSet := 'UTF-8';

         try
              RisultatoPost := lHTTP.Post(Comando, lParamList);
          except
            on E: EIdHTTPProtocolException do
            begin
                Memo1.Lines.Add(E.ErrorMessage);
            end;
          end;
     finally
       lHTTP.Free;
     end;

   finally
      lParamList.Free;
   end;
end;

I have this error:

{"timestamp":"2019-03-01T21:45:29.634+0000","status":400,"error":"Bad Request","message":"JSON parse error: Unexpected character ('%' (code 37)): expected a valid value (number, String, array, object, 'true', 'false' or 'null'); nested exception is com.fasterxml.jackson.core.JsonParseException: Unexpected character ('%' (code 37)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: (PushbackInputStream); line: 1, column: 2]","path":"/core-trasmissione-rest-fattura/services/invoice/upload"}


THIS IS THE DOCUMENTATION:

7.1. Upload invoice

Code:
POST /services/invoice/upload

Questo metodo deve essere utilizzato dall’OE per effettuare l’invio di una fattura già nel formato XML secondo norme AGID, ma non ancora firmata digitalmente.
HTTP request
Code:
POST /services/invoice/upload HTTP/1.1
Accept: application/json
Authorization: Bearer NLOGDVXLVaF3tzmnVPkTwpkuh7dG0i09uSCcog3u+rE=
Content-Type: application/json;charset=UTF-8

{
 "dataFile" : "dGVzdA==",
 "credential" : "",
 "domain" : ""
}


I parametri [i]"domain" e "credential" rappresentano rispettivamente il dominio e le credenziali di firma automatica se possedute dall’utente, in caso contrario lasciare tali campi vuoti.[/i]

Request headers
Name
Description

Code:
Authorization

Provisioner access token

Request fields
Path
Type
Description

Code:
dataFile

Code:
String

Dati allegato in formato encoded Base64

Code:
credential

Code:
String

Credenziali firma

Code:
domain

Code:
String

Domain firma

HTTP response
Code:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 105

{
 "errorCode" : "",
 "errorDescription" : "",
 "uploadFileName" : "IT01490810845_uxjhl.xml.p7m"
}

Response fields
Path
Type
Description

Code:
uploadFileName

Code:
String

Nome file fattura (inviato a SdI) restituito dal ws

Code:
errorCode

Code:
String

Eventuale codice di errore

Code:
errorDescription

Code:
String

Eventuale descrizione errore



thanks

Print this item

  2 Intraweb installations
Posted by: neo1667 - 03-01-2019, 07:27 AM - Forum: IntraWeb General Discussion - Replies (1)

Hello,

Is it possible to have 2 instalations of Intraweb in the same computer without problem, conflict :

- 1 Intraweb 14 with Delphi Tokyo
- 1 Intraweb 15 with Delphi 10.3.1

they are two ultimate versions of Intraweb. The goal is to migrate from Delphi Tokyo to Delphi 10.3.1.

thank you for your help

Regards,
Dany

Print this item

  IWCL_HookEvent in IWCommon.js correct?
Posted by: jeroen.rottink - 02-28-2019, 06:09 PM - Forum: IntraWeb General Discussion - Replies (5)

This function is called internally by IW to attach an event handler to an object. For example an onclick event.
If the html already declares an onclick event listener for that object, IWCL_HookEvent moves this original event handler to an internal structure (array[]) and adds the new one.
This way they both get called I presumed but that didn't work.
Debugging the code I am not sure if following is ok.

Code:
   IWCL_HookEvent: function(eventName, eventHandler) {
       var i = IW.Events.findByName(eventName);
       logMessage("IWCL_HookEvent(): eventName = " + eventName);
       if (this.IEEventHandlers[i] == null) {
           this.IEEventHandlers[i] = [];
           var xEventName = "on" + eventName;
           if (this[xEventName] != null) {
               this.IEEventHandlers[0] = this[xEventName]       // <<-- replace with this.IEEventHandlers[i][0] = this[xEventName]  ?????
           }
           this[xEventName] = IW.Events.IWEventHandler;
       }

Print this item

  Bootstrap IW DatePicker
Posted by: ShaneStump - 02-28-2019, 05:50 PM - Forum: IntraWeb General Discussion - No Replies

Howdy All!

Has anyone using the bootstrap with IW 15 figured out how to set the valid date range of input control when it is set to date?

I find many examples around web but it seems everyone has a 'different' date picker they are using with bootstrap.

** Update **

I just realized the input control was using an HTML 5 control so I added the min/max properties.

Thanks in advance,

Shane

Print this item

  Sample 10.3 POP3 code moving from Indy 9 on D7
Posted by: jackmason@mindspring.com - 02-27-2019, 07:47 PM - Forum: Indy - Replies (4)

Converted our D7 & Indy 9 application to Studio 10.3 & Indy 10 with one exception:   POP3 email processing.  Under Indy 9, our code worked as we wished.  Moving to Indy 10 apparently requires an additional module which we have yet to identify.

The following identifiers become 'undeclared idenitifier":

 [            if (EmailMsg.MessageParts.Items[Jdx] is TIdAttachment) then


              if EmailMsg.MessageParts.Items[Jdx] is TIdText then

              pnlAttachments.visible := true;
              li := lvMessageParts.Items.Add;
              li.ImageIndex := 8;
              li.Caption := TIdAttachment(Msg.MessageParts.Items[Jdx]).Filename;
              li.SubItems.Add(TIdAttachment(Msg.MessageParts.Items[Jdx]).ContentType);
]

We greatly appreciate the Indy Project it has been a great assistance to us since the release of Indy9.

Jack

Print this item

  Intraweb DUnit Testing
Posted by: cpstevenc - 02-27-2019, 05:35 PM - Forum: IntraWeb General Discussion - Replies (22)

Using Toyko 10.2.3 with the "DUnit Test Project" for Intraweb.

Using Intraweb 14.2.7

I can't get the program to start up at all as it bombs out due to not being able to access "IW_FAVICON"

Code:
exception message  : Cannot find internal file: IW_FAVICON.

main thread ($2d20):
006b9ad4 +18 CrashLinkTesting.exe IWException             119  +2 EIWException.IfTrue
007264d7 +57 CrashLinkTesting.exe IWServerInternalFiles   135  +2 TIWServerInternalFiles.GetResourceStream
00726905 +4d CrashLinkTesting.exe IWServerInternalFiles   226  +2 TIWServerInternalFiles.InternalAdd
00726c6d +15 CrashLinkTesting.exe IWServerInternalFiles   276  +2 TIWServerInternalFiles.AddSystemFiles
0072664a +52 CrashLinkTesting.exe IWServerInternalFiles   159  +7 TIWServerInternalFiles.Create
007dfb97 +13 CrashLinkTesting.exe IWServerInternalFiles   460  +1 initialization
0040a372 +42 CrashLinkTesting.exe System                22836 +21 InitUnits
0040a3db +3f CrashLinkTesting.exe System                22911 +14 @StartExe
0041196a +42 CrashLinkTesting.exe SysInit                1482 +11 @InitExe
007e0b0f +0b CrashLinkTesting.exe CrashLinkTesting         21  +0 initialization
76d38482 +22 KERNEL32.DLL                                         BaseThreadInitThunk


006b9abc     public IWException.EIWException.IfTrue:  ; function entry point
006b9abc 117   push    ebp
006b9abd       mov     ebp, esp
006b9abf       push    ebx
006b9ac0       push    esi
006b9ac1       mov     esi, ecx
006b9ac3       mov     ebx, eax
006b9ac5 118   test    dl, dl
006b9ac7       jz      loc_6b9ad9
006b9ac9 119   mov     ecx, esi
006b9acb       mov     dl, 1
006b9acd       mov     eax, ebx
006b9acf       call    -$2612e4 ($4587f0)     ; System.SysUtils.Exception.Create
006b9ad4     > call    -$2afaa5 ($40a034)     ; System.@RaiseExcept
006b9ad9 121   pop     esi
006b9ada       pop     ebx
006b9adb       pop     ebp
006b9adc       ret

Any ideas?

Oh and is there any good documentation on how to do IW related unit testing?

Code:
procedure T.Test;
begin
 with NewSession do ///// <--- exception error
   try
     with MainForm as TIWForm1 do
     begin

     end;
   finally
     Free;
   end;
end;

This is the example code it generates for a test ....  But it doesn't really reflect how you would stage this all up properly to work with MY forms and such.

'with NewSession do" generates an exception error "IW Application not properly initilized"

Print this item

  Indy SMTP Settings
Posted by: sorinh - 02-27-2019, 11:22 AM - Forum: Indy - Replies (1)

Hello
 
I want to use the TIdSMTP with Office 365
What are the settings or where I can find an example of this?
 
Thanks, Sorin

Print this item

  http.sys and ssl
Posted by: joelcc - 02-25-2019, 06:40 PM - Forum: IntraWeb General Discussion - Replies (3)

with if I wanted to use http.sys does the ssl encryption come from openssl or from windows?

How do I handle the ssl certificates?

Print this item

  EInvalidAppID exception raises EConvertError
Posted by: JuergenS - 02-24-2019, 11:28 AM - Forum: IntraWeb General Discussion - Replies (1)

Hi

Versions:
C++Builder Rio 10.3.1
IW15.0.18

EInvalidAppID exception raises EConvertError now!

Debugger event log:

Erste Gelegenheit für Exception bei $754C18A2. Exception-Klasse EConvertError mit Meldung 'Format 'Session ID         : %s' ungültig oder nicht kompatibel mit Argument'. Prozess MyApplication.exe (9320)
"First chance exception at $754C18A2. Exception class EConvertError with message 'Format 'Session ID         : %s' invalid or not compatible with argument'. process MyApplication.exe (9320)"


Exception logfile:

------------------------------------------------------------------------------------------------------------------------
Exception message  : Session ID is invalid.
Exception class    : EInvalidAppID
Exception address  : 009E9E77
Exception Time     : 2019-02-24 11:17:36.118
------------------------------------------------------------------------------------------------------------------------
Application Name   : MyApplication.exe
Application Version: 1.0.0.0
Started at         : 2019-02-24 11:14:33.103
Running for        :  3 minutes 3 seconds
Computer Name      : MyComputer
Compiler Version   : 330
------------------------------------------------------------------------------------------------------------------------
IntraWeb Version   : 15.0.18
Multi-session      : False
Content Path       : MyPath
Session count      : 0
------------------------------------------------------------------------------------------------------------------------
Error getting Request information: Format 'Session ID         : %s' ungültig oder nicht kompatibel mit Argument
------------------------------------------------------------------------------------------------------------------------
[Stack trace is empty]
------------------------------------------------------------------------------------------------------------------------

Debugger call stack:

:754c18a2 KERNELBASE.RaiseException + 0x62
:00765F8E System::Sysutils::ConvertErrorFmt(ResString=????, Args=????, ...)
:0076926D System::Sysutils::FormatBuf(Buffer=????, BufLen=????, Format=????, FmtLen=23, Args=:0791F5B8, AFormatSettings={ { ???? }, '\0', '\0', '\0', L'', L'ޑ', { ???? }, { NULL }, { ???? }, { u"Session ID         : %s" }, { ???? }, { ???? }, { { { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? } } }, { { { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { u"[Stack trace is empty]" } } }, { { { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? } } }, ... }, Result=????)
:00769405 System::Sysutils::FmtStr(Result=????, Format=????, Args=:0791F5B8, AFormatSettings={ { ???? }, '\0', '\0', '\0', L'', L'ޑ', { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { { { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? } } }, { { { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL } } }, { { { ???? }, { ???? }, { u"Session ID         : %s" }, { NULL }, { ???? }, { ???? }, { ???? } } }, ... }, Len=9751543)
:0076937F System::Sysutils::Format(Format=????, Args=????, AFormatSettings={ { ???? }, 'X', 'F', L'̒', L'䙘', L'̒', { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { { { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { ???? }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL } } }, { { { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { ???? }, { ???? }, { u"Session ID         : %s" }, { NULL }, { ???? } } }, { { { ???? }, { ???? }, { NULL }, { ???? }, { ???? }, { ???? }, { ???? } } }, ... }, Result=????)
:00769364 System::Sysutils::Format(Format=????, Args=????, Result=????)
:0094d328 ; GetRequestInfo
:0094d5d8 ; CreateReport
:0094da36 ; LogException
:00967247 Iwservercontrollerbase::TIWServerControllerBase:Big GrinoLogException + 0x1F
:009671d0 Iwservercontrollerbase::TIWServerControllerBase:Big GrinoException(Iwapplication::TIWApplication *,System::Sysutils::Exception *,Iw::Http::Request::THttpRequest *) + 0x20
:009ea297 Iwserversession::_16444 + 0x1F
:009d883e ; Execute
:009e596c Iwserversession::HttpExecute + 0x2C
:00a291aa ; DoCommandGet
:00922e46 ; DoExecute
:0090f476 Incontext::TInContext::Run + 0x12
:0080833C System::Classes::ThreadProc(Thread=:030A25D0)
:0074B9B2 System::ThreadWrapper(Parameter=????)
:74b78484 KERNEL32.BaseThreadInitThunk + 0x24
:770d41c8 ntdll.RtlAreBitsSet + 0x88

The exception will be raised when the session has been closed.

Best regards
Juergen

Print this item