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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 101,928
» Latest member: ltdkeonhacaitv1
» Forum threads: 2,428
» Forum posts: 11,382

Full Statistics

Online Users
There are currently 715 online users.
» 6 Member(s) | 705 Guest(s)
Applebot, Bing, Google, Yandex, 88vbetsacom1, aeronvance, cakhiatvreviews, ltdkeonhacaitv1, sunwinapk1org1, suryahub

Latest Threads
KanBan like behaviour
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
5 hours ago
» Replies: 5
» Views: 266
TContenthandler requires ...
Forum: IntraWeb General Discussion
Last Post: valmeras
10-02-2026, 04:14 PM
» Replies: 1
» Views: 462
TIWSummernote Issue
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
09-30-2026, 07:34 PM
» Replies: 1
» Views: 127
Reproducible IIS crash in...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
09-21-2026, 05:33 PM
» Replies: 1
» Views: 545
WebApplication.IP change ...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
09-21-2026, 05:31 PM
» Replies: 2
» Views: 621
How can I get started? Do...
Forum: CrossTalk General Discussion
Last Post: taggame
09-17-2026, 03:17 AM
» Replies: 2
» Views: 4,347
Hook/callback to handle t...
Forum: IntraWeb General Discussion
Last Post: Lenfors
09-08-2026, 09:03 AM
» Replies: 0
» Views: 408
The packages IW16.xx inc...
Forum: IntraWeb General Discussion
Last Post: hsbelli
09-03-2026, 11:46 AM
» Replies: 2
» Views: 800
Redirection issues with F...
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 10:03 AM
» Replies: 0
» Views: 465
Source Code
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 08:11 AM
» Replies: 3
» Views: 1,020

 
  External JS and CSS Files
Posted by: baxing - 04-01-2023, 04:51 PM - Forum: IntraWeb General Discussion - Replies (14)

Hello,

I use Bootstrap for my IntraWeb project and there are many css and js files which using in each page (same and differ of each pages).
Now I use AddBodyScriptFile and ContentFiles to add them in my each form. It's work, if build with SA Indy (.exe) but I switch to build with ISAPI (.dll) and test it on IIS. I found AddBodyScriptFile and ContentFiles not working in this case. Below is result

example my css and js link when Run Web App with SA Indy (.exe) --> OK

<link href="/assets/mycss.css" rel="stylesheet" type="text/css"/>

<script src="/assets/myjs.min.js"></script>


but this is example my css and js link when Run Web App with ISAPI (.dll) --> not working

<link href="/myIWProject.dll/assets/mycss.css" rel="stylesheet" type="text/css"/>

<script src="/myIWProject.dll/assets/myjs.min.js"></script>

--------
The Problem : when Run Web App with ISAPI (.dll) in path of both CSS and JS have my dll name together ( this case is --> /myIWProject.dll on the file path).
How to cancel this name/path(/myIWProject.dll) or 
Which way I should to add link(css) and script(js) tag for css and js path in my each Delphi form (Each form may not reference the same css or js.)

Thank you.

Print this item

  class function TIWExceptionRendererEx.RenderHTML
Posted by: Mikael Nilsson - 03-31-2023, 12:11 PM - Forum: IntraWeb General Discussion - Replies (8)

Hi,

I'm using this function with great success.
But I need to reference a variable in the UserSession. How do I do that?

Print this item

  How URL routing
Posted by: matija - 03-29-2023, 05:28 AM - Forum: IntraWeb General Discussion - Replies (1)

How implement URL routing products? Where to start?

Example:
http://localhost/articles/article-1 
http://localhost/articles/article-2

Print this item

  add attr in input tag
Posted by: raulevm - 03-29-2023, 12:44 AM - Forum: IntraWeb General Discussion - Replies (1)

I would like to add from Delphi the data-role attribute with the value "checkbox" in the input tag of an IWCheckBox. I was only able to create it in the span tag, but I need to put it in the input tag

Code:
procedure TFrmMain.IWCheckBox1HTMLTag(ASender: TObject; ATag: TIWHTMLTag);
begin
ATag.AddStringParam('data-role', 'checkbox');
end;
Code:
<span class="IWCHECKBOX1CSS" data-role="checkbox" data-type="IWCHECKBOX" id="IWCHECKBOX1">
<input id="IWCHECKBOX1_CHECKBOX" name="IWCHECKBOX1_CHECKBOX" type="CHECKBOX">
<span id="IWCHECKBOX1_CHKBCAPTION">IWCheckBox1</span></span>

I wish it was like this


Code:
<span class="IWCHECKBOX1CSS" data-type="IWCHECKBOX" id="IWCHECKBOX1">
<input id="IWCHECKBOX1_CHECKBOX" data-role="checkbox" name="IWCHECKBOX1_CHECKBOX" type="CHECKBOX">
<span id="IWCHECKBOX1_CHKBCAPTION">IWCheckBox1</span></span>

Print this item

  TerminateAndRedirect
Posted by: Comograma - 03-28-2023, 03:56 PM - Forum: IntraWeb General Discussion - Replies (6)

I have a main form and a second form.
I have a button on the second form to terminate session/app.

I open main than with a button click, I open my second form. On that form a hit a button that calls WebApplication.TerminateAndRedirect('some page')

Why is that instead of terminate and redirect to the specified page, the app return to the main form?

Print this item

  How not refresh parameter
Posted by: matija - 03-28-2023, 07:45 AM - Forum: IntraWeb General Discussion - Replies (1)

If directly (first) write URL http://localhost/details?number=1  then read details
and then change URL http://localhost/details?number=2 and then not read details! I have to close browser it work.

Where/How do I need to read the URL parameter again? What wrong in my code?

My code:

IWServerControllerBaseConfig ->

with THandlers.Add('', '/Details', TContentForm.Create(TDetailsForm)) do
begin
    CanStartSession := true;
    RequiresSessionStart := false;
end;

IWServerControllerBaseGetMainForm ->

if WebApplication.RunParams.Count>0 then
begin

    if UserSession.param= 'number' then
        vMainForm:=TDetailsForm.Create(WebApplication)
    else
        vMainForm:=TDetailsForm.Create(WebApplication);

end else
      vMainForm:=TMainForm.Create(WebApplication);

TDetailsForm.IWAppFormShow ->

if (WebApplication.RunParams.IndexOfName('number') <> -1) then
      UserSession.param := WebApplication.RunParams.Values['number'];

Print this item

  IWDBGrid - (RefreshAsyncRender, DoRefreshControl)
Posted by: raulevm - 03-26-2023, 07:35 PM - Forum: IntraWeb General Discussion - Replies (1)

Good afternoon, working with an example template, I try to asynchronously refresh an IWDBGrid control to see the changes of a DataSet. I have used the RefreshAsyncRender method and the IWDBGrid1.DoRefreshControl := True; property. I can see the changes to the DataSet but the control scrolls below all other controls. Even if I don't have any DataSet connected to the IWDBGrid the control changes position.

Initially:

{%IWBUTTON1%}
{%IWBUTTON2%}
{%IWDBGRID1%}
{%IWBUTTON3%}
{%IWBUTTON4%}


After applying the mentioned method and property:

{%IWBUTTON1%}
{%IWBUTTON2%}
{%IWBUTTON3%}
{%IWBUTTON4%}
{%IWDBGRID1%}

I attach an example project. If this is an IntraWeb failure, which of the two ways should I use to correctly refresh the IWDBGrid asynchronously? Thanks



Attached Files
.zip   RefreshError.zip (Size: 92.13 KB / Downloads: 3)
Print this item

  How to reach TIWForm’s or TIWFrame’s components from another TIWForm or TIWFrame in c
Posted by: Ibouka - 03-24-2023, 01:01 PM - Forum: IntraWeb General Discussion - No Replies

I am working with a single IWForm in which I display alternatively IWFrames though it may have two IWFrame at the same time.
Under VCL and FMX environment TForm class is redefined as extern package that can be used to reach its properties everywhere within the project.

Code:
extern PACKAGE TForm1 *Form1;
There is no such a redefinition under IntraWeb and I didn’t manage to access properly the properties of my IWForm and IWFrame apart from their own source.
The workaround I found is to manually redefine IWForm and IWFrame like below:
Code:
//.h
class TIWFrame2: public TFrame
{
__published:    // IDE-managed Components
TIWRegion *IWFrameRegion;
private:    // User declarations
    TIWForm1 *IWForm1;
    TIWFrame1 *IWFrame1;
public:        // User declarations
        __fastcall TIWFrame2(TComponent* Owner);
};
//---------------------------------------------------------------------------

//.cpp
__fastcall TIWFrame2::TIWFrame2(TComponent* Owner)
        : TFrame(Owner)
{
IWForm1 = static_cast<TIWForm1*>(Owner);
IWFrame1 = static_cast<TIWFrame1*>(Owner);
}
//---------------------------------------------------------------------------
This snippet doesn’t compile in the UserSessionUnit, so every IWFrame must have its own declaration of almost all other IWFrame resulting in a messy code.
Furthermore, this doesn’t work every time. If two IWFrame are displayed in the IWForm, the tip doesn’t work for the first one.
I am afraid I am missing something trivial allowing to reach TIWForm’s or TIWFrame’s components from another TIWForm or TIWFrame in C++Builder.
Any idea?
Thank you for your help & Kind regards.

Print this item

  ContentHandlers for Articles not for Pages
Posted by: matija - 03-23-2023, 12:49 PM - Forum: IntraWeb General Discussion - Replies (4)

How can we implement show in one form my details articles?

I know an example from the pages!

THandlers.AddRootHandler('', '/', FormHandler)
with THandlers.Add('', '1', TContentForm.Create(TShopForm)) do
  begin
    CanStartSession := true;
    RequiresSessionStart := false;
 end;

Example:
http://localhost/shop/1 -> Details for article 1
http://localhost/shop/2 -> Details for article 2
http://localhost/shop/3 -> Details for article 3

Is there any demo?

Print this item

  TIWVideo file size limit?
Posted by: davidbaxter - 03-22-2023, 09:09 PM - Forum: IntraWeb General Discussion - Replies (4)

Working with the IWVideo demo program. If I copy lion.mp4 to a directory on my server, set iwvideo.videofile.url to that directory and run, all is well. If I change to the video I actually want to play, which is 1.5G, I get a spinning wait indicator and then nothing. The lion video will show "0/0:15" in the player, my file only "0". It doesn't seem to load.
My question is, then, is there a file size limitation, or do I need to do something other than RefreshAsyncRender to get a large file to play?

Print this item