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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 86,066
» Latest member: kyinkky
» Forum threads: 2,413
» Forum posts: 11,329

Full Statistics

Online Users
There are currently 443 online users.
» 3 Member(s) | 437 Guest(s)
Applebot, Bing, Google, kyinkky, sin88vnnet, tructiepbongdaq

Latest Threads
TIWjQDBGrid erratic behav...
Forum: IntraWeb General Discussion
Last Post: Fabrizio Conti
Yesterday, 06:27 AM
» Replies: 6
» Views: 758
Need Help Integrating Mic...
Forum: IntraWeb General Discussion
Last Post: capheny
07-07-2026, 06:43 AM
» Replies: 0
» Views: 126
OpenSSL and concurrent re...
Forum: Indy
Last Post: kbriggs
07-05-2026, 02:41 PM
» Replies: 5
» Views: 430
Projeto Intraweb
Forum: IntraWeb General Discussion
Last Post: vonirpereira
07-03-2026, 06:51 PM
» Replies: 0
» Views: 173
Intraweb + Lazarus
Forum: IntraWeb Dúvidas Gerais
Last Post: vonirpereira
07-03-2026, 06:35 PM
» Replies: 0
» Views: 106
Image question on tiwjqdb...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
07-01-2026, 12:19 AM
» Replies: 4
» Views: 4,361
CSS file not reloading af...
Forum: IntraWeb General Discussion
Last Post: Gustave
06-30-2026, 09:00 PM
» Replies: 0
» Views: 150
IW 16.2.0 Missing librari...
Forum: IntraWeb General Discussion
Last Post: Gregory_Twedt
06-24-2026, 04:40 AM
» Replies: 5
» Views: 913
VCL conversion
Forum: Delphi General Discussion
Last Post: tobenschain
06-20-2026, 05:00 AM
» Replies: 0
» Views: 170
TIWjQDBGrid changing UI
Forum: IntraWeb General Discussion
Last Post: BoostedCruiser
06-08-2026, 02:02 AM
» Replies: 36
» Views: 71,297

 
  service workers in IW?
Posted by: iwuser - 11-13-2024, 07:30 AM - Forum: IntraWeb General Discussion - No Replies

Does IntraWeb provide for a way to add/change browser request headers on a redirect? - I know that it's a security issue and was not traditionally possible, but apparently some such things can now be done with service workers. If there's already some plumbing for this in IW, then it would save me a lot of time. Would also be nice to know the rules: what can and cannot be done in what cases.

Print this item

  call JS from Delphi code
Posted by: iwuser - 11-11-2024, 07:30 AM - Forum: IntraWeb General Discussion - Replies (3)

There are many examples of the reverse, but none that gives you ability to call a JS function on a page from Pascal. Is it possible?

For instance, I want to submit a form. Which I have just dynamically created on the page.

I know that if I add some OnLoad JS somewhere and click some button synchronously, it would re-render the form, execute that OnLoad function and this can submit my form, but I'm trying to avoid reloading the form, I want the buttons to work asynchronously, so there will be no reload and any OnLoad events there would not fire.

Print this item

  content handlers, sessions and cookies
Posted by: iwuser - 11-11-2024, 06:11 AM - Forum: IntraWeb General Discussion - Replies (1)

Without a lot of doco, everything becomes a problem. If these questions are already covered anywhere, can someone please point me there? -

1) I can see a new session created on every new request to a content handler, but at the same time, no cookie is being set. I would have thought the IW cookie should be set automatically to match the Session, so if a content handler is called 1,000 times, it would not leave 1,000 sessions behind. I'm creating content handlers with:
          CanStartSession := True;
          RequiresSessionStart := False;

Are there any tricks to it, or would session handling need to be coded from scratch, if needed? Because without this, what good are these ephemeral sessions anyway?

2) Also. can a handler be defined for a wildcard path, like /do/*? - to respond on both /do/this and /do/that?

Or defined for /do, so that requests for /do/something trigger it? - because from what I see, it's not happening.

Or can content handlers be released and recreated at runtime, i.e.: in a form event? - because I need to listen on a number of configurable paths, which may change from time to time and I would not want to restart the service every time this list changes.

3) There're AddRootHandler & AddStartHandler methods there as well. What do they do / what are they for?

Print this item

  Creating TIWGrid dynamically on a frame
Posted by: troberts - 11-11-2024, 02:39 AM - Forum: IntraWeb General Discussion - Replies (1)

I have a frame which I am displaying on four pages of a TIWTabControl. The four TIWTabPage pages are created dynamically, and as each one is created an instance of the frame is created and assigned to the page by setting its parent. There are some components such as TIWButtons on the frame and everything up to this point works perfectly.

I need to add a TIWGrid to the frame. I can place one on the frame in design time and it works but I can only update the grid on the first tab page. I figured out that this was because each instance of the grid must have a unique name. I tried setting the name in the IWFrameRegion create event but that did not work. It resulted in access violations.

So I then decided to create the grid dynamically, again in the IWFrameRegionCreate, and assign a unique name to each grid. This was partially successful.

Code:
  GrdHours := TIWGrid.Create(Self);
  ConfigureGrid(GrdHours, 'GrdHours', 335, 11);

And my ConfigureGrid method:

Code:
  procedure ConfigureGrid(AIWGrid: TIWGrid; AName: string; ATop: Integer; ALeft: Integer);
  begin
    AIWGrid.Parent := IWFrameRegion;
    AIWGrid.Name := AName + ComponentID.ToString;
    Inc(ComponentID);
    AIWGrid.Caption := '';
    AIWGrid.Left := ALeft;
    AIWGrid.Top := ATop;
    AIWGrid.Width := 377;
    AIWGrid.Height := 165;
    AIWGrid.UseFrame := False;
    AIWGrid.UseSize := True;
    AIWGrid.ShowEmptyCells := True;
    AIWGrid.ShowInvisibleRows := True;
    AIWGrid.ColumnCount := 4;
    AIWGrid.RowCount := 7;
    AIWGrid.ScrollToCurrentRow := False;
  end;

It works, and I can update the grid on each frame individually, BUT the problem is that all four grids are visible on the first tab page and none are visible on the other three tab pages.

I am creating some other components like TIWLabels using this same technique and there is no problem with them. Each tag page has its own instance of the label. 

To summarise: I create four instances of the tab page, and each page contains a dynamically created TIWGrid. All four instances of the grid are visible on the first tab page, and the other three tab pages do not show any grids.

Is there some other property of the grid I need to set to make it display on the tab page it belongs to?

Thank you!

Print this item

  NTLM Support for TidSMTP
Posted by: Matt G - 11-10-2024, 08:05 PM - Forum: Indy - Replies (2)

Is this something that is currently supported, downloaded the latest source after coming across AV's with this SASL processing and it looks like this is not enabled?

Code:
AV was with this line: setup_des_key(PDES_cblock(Integer(Akeys) + 7)^, ks);


Is there any information on NTLM support now or is that gone?

Looks like IdFIPS.pas disables NTLM by default now:

Code:
function DefLoadNTLMLibrary: Boolean;
begin
  Result := False;
end;



Thanks
Matt

Print this item

  customize Application time-out message
Posted by: wieczy - 11-07-2024, 02:35 PM - Forum: IntraWeb General Discussion - No Replies

Hi, 

how can I customize the application time-out message? This message appears when the user uses an expired link and the server has been restartet.

WebApplication->GotoURL() does not work at this point because there is no WebApplication (== NULL).

Does anyone have an idea?


Greetings wieczy

Print this item

  IW16 and TMSiwPro
Posted by: davidbaxter - 11-05-2024, 11:59 PM - Forum: IntraWeb General Discussion - Replies (2)

The new install of IW16 has blown away all the TMSiwPro components. TMS doesn't support them anymore, but they're still very good. Has anyone else encountered this and (hopefully) have a work-around?

Print this item

  IntraWeb 16.0.0 (and Lazarus support) is here!
Posted by: Alexandre Machado - 11-01-2024, 09:20 AM - Forum: IntraWeb General Discussion - Replies (19)

Hi guys,

It's real!!!

IntraWeb now supports Lazarus IDE and Free Pascal Compiler. A single code base, the same solid product, the same features, now available in Lazarus.  Big Grin

We have a new major version available for immediate download:

https://www.atozed.com/2024/11/intraweb-16-0-0/

Regarding Lazarus support:

- The same installer should be used for all supported IDEs (From RAD Studio 2009 to RAD Studio 12.2 and Lazarus 3.4 or 3.6)
- The same license can be used in any IDE, concurrently. You can use your active IW 15 license with IW 16 in Lazarus.
- All 4 application types are also available for Lazarus: Http.sys, ISAPI, SA-Indy, ASPX. 
- IntraWeb for Lazarus must be installed on Lazarus for Windows, 64 bits
- Versions 3.4 (from FpcDeluxe) and 3.6 (Official) are both supported
- Free Pascal Compiler 3.2.2 is supported, x64 (x86_64-win64 target only)
- Linux targets are not supported ATM. It's in our roadmap and being developed.
- Please check our site for instructions/notes on how to install IntraWeb on Lazarus/FPC: https://www.atozed.com/intraweb/how-to-i...n-lazarus/

Enjoy!   Smile

Print this item

  working with templates, the rules
Posted by: iwuser - 10-29-2024, 09:37 AM - Forum: IntraWeb General Discussion - Replies (3)

Is there a list of what type of HTML tags can be used with all the different types of IW controls? I.e.: what goes with what?

I'm trying to use a Bootstrap template with things like:

                      <div class="card">
                        <div class="card-body">
                          <div class="card-title d-flex align-items-start justify-content-between">
                            <div class="avatar flex-shrink-0">
                              <img
                                src="assets/img/user.png"
                                alt="Users"
                                class="rounded"
                              />
                            </div>
                            <div class="dropdown">
                              <button
                                class="btn p-0"
                                type="button"
                                id="cardOpt3"
                                data-bs-toggle="dropdown"
                                aria-haspopup="true"
                                aria-expanded="false"
                              >
                                <i class="bx bx-dots-vertical-rounded"></i>
                              </button>
                              <div class="dropdown-menu dropdown-menu-end" aria-labelledby="cardOpt3">
                                <a class="dropdown-item" href="javascript:void(0);">List</a>
                                <a class="dropdown-item" href="javascript:void(0);">Manage</a>
                              </div>
                            </div>
                          </div>
                          <span class="fw-semibold d-block mb-1">Users:</span>
                          {%lblUserCount class="card-title mb-2"%}
                        </div>
                      </div>


I want the image to be static, as it is. But ideally clickable. Do I have to replace the entire IMG with an IW component? Or wrap it into an <A></A> (and then if I do, how do I link that to an IW button, for example)?

And with classes/styles in the HTML, how can I link a button (or anything) back to <A>? And then can I push styles/classes back to HTML controls (whether I do or do not map them to anything from code)? Like the "active" below, when the next item is clicked:

[...]
          <ul class="menu-inner py-1">
            <li class="menu-item active">
              <a href="index.html" class="menu-link">
                <i class="menu-icon tf-icons bx bx-home-circle"></i>
                <div data-i18n="Analytics">Dashboard</div>
              </a>
            </li>

            <li class="menu-item">
              <a href="javascript:void(0);" class="menu-link menu-toggle">
                <i class="menu-icon tf-icons bx bx-layout"></i>
                <div data-i18n="Layouts">Layouts</div>
              </a>
[...]


Or does the entire structure need to be replaced with a Tab control for this?

It really needs another Guide, it's a whole new field...

Print this item

  Encoding problem?
Posted by: Justin Case - 10-27-2024, 08:27 PM - Forum: Indy - Replies (7)

My Client is failing to logon to my server now and I think this is an upgrade woe (I'm using 10.6.3.3)

The client sends a string command like this: logon¦<username>¦password

After being stumped as to it not working anymore, I ended up doing a debug and seeing that the clients TCP thread is sending it but the server isn't happy - and sends back a 400 quoting it with ? instead of ¦

So I went and debugged the server and the TIdCmdTCPServer.DoExecute function is reading it in as: logon?<username>?password

Clearly this is not what was sent however ¦ is turning into ?

In IdGlobal there is this function that the client calls when calling WriteLn():


Code:
function ToBytes(const AValue: string; const ALength: Integer; const AIndex: Integer = 1;
  ADestEncoding: IIdTextEncoding = nil
  {$IFDEF STRING_IS_ANSI}; ASrcEncoding: IIdTextEncoding = nil{$ENDIF}
  ): TIdBytes; overload;
var
  LLength: Integer;
  {$IFDEF STRING_IS_ANSI}
  LBytes: TIdBytes;
  {$ENDIF}
begin
  {$IFDEF STRING_IS_ANSI}
  LBytes := nil; // keep the compiler happy
  {$ENDIF}
  LLength := IndyLength(AValue, ALength, AIndex);
  if LLength > 0 then
  begin
    EnsureEncoding(ADestEncoding);
    {$IFDEF STRING_IS_UNICODE}
    SetLength(Result, ADestEncoding.GetByteCount(AValue, AIndex, LLength));
    if Length(Result) > 0 then begin
      ADestEncoding.GetBytes(AValue, AIndex, LLength, Result, 0);
    end;
    {$ELSE}
    EnsureEncoding(ASrcEncoding, encOSDefault);
    LBytes := RawToBytes(AValue[AIndex], LLength);

//LBytes is: (76, 111, 103, 111, 110, 166, 83, 97, 102, 102, 108, 101, 115, 166, 104, 111, 114, 97, 99, 101, 13, 10)

    CheckByteEncoding(LBytes, ASrcEncoding, ADestEncoding);

//LBytes is: (76, 111, 103, 111, 110, 63, 83, 97, 102, 102, 108, 101, 115, 63, 104, 111, 114, 97, 99, 101, 13, 10)

    Result := LBytes;
    {$ENDIF}
  end else begin
    SetLength(Result, 0);
  end;
end;

As you can see the bytes 166 are transformed into bytes 63. This never used to happen. Why does it happen now?

This seems to be triggered here:

Code:
function TIdASCIIEncoding.GetBytes(const AChars: PIdWideChar; ACharCount: Integer;
  ABytes: PByte; AByteCount: Integer): Integer;
var
  P: PIdWideChar;
  i : Integer;
begin
  // TODO: decode UTF-16 surrogates...
  P := AChars;
  Result := IndyMin(ACharCount, AByteCount);
  for i := 1 to Result do begin
    // replace illegal characters > $7F
    if UInt16(P^) > $007F then begin

//This next line seems to do it
      ABytes^ := Byte(Ord('?'));

    end else begin
      ABytes^ := Byte(P^);
    end;
    //advance to next char
    Inc(P);
    Inc(ABytes);
  end;
end;


Any ideas please?

Thanks

Print this item