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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 6,256
» Latest member: StevenCoP
» Forum threads: 2,151
» Forum posts: 10,477

Full Statistics

Online Users
There are currently 261 online users.
» 0 Member(s) | 258 Guest(s)
Bing, Google, Yandex

Latest Threads
Create components at runt...
Forum: IntraWeb General Discussion
Last Post: ramiroflores
Today, 02:36 AM
» Replies: 0
» Views: 13
message when added TIWDBN...
Forum: IntraWeb General Discussion
Last Post: Mike_A
Yesterday, 02:09 PM
» Replies: 6
» Views: 1,186
303 Redirect and Response...
Forum: IntraWeb General Discussion
Last Post: ALW2019
Yesterday, 01:25 PM
» Replies: 3
» Views: 479
IW 15.5.9 IWChart
Forum: IntraWeb General Discussion
Last Post: PaulWeem
Yesterday, 07:16 AM
» Replies: 2
» Views: 202
Data Decimation in ChartJ...
Forum: IntraWeb General Discussion
Last Post: iwuser
Yesterday, 06:51 AM
» Replies: 8
» Views: 1,524
ClassicRegionDraw
Forum: IntraWeb General Discussion
Last Post: JuergenS
04-17-2024, 05:35 PM
» Replies: 0
» Views: 151
CompressorImplementation
Forum: IntraWeb General Discussion
Last Post: JuergenS
04-17-2024, 05:27 PM
» Replies: 0
» Views: 135
IntraWeb 15.6.0 is out!
Forum: IntraWeb General Discussion
Last Post: Comograma
04-17-2024, 11:54 AM
» Replies: 11
» Views: 916
How to manage forms and v...
Forum: IntraWeb General Discussion
Last Post: David1
04-17-2024, 10:37 AM
» Replies: 0
» Views: 132
iwjqdbgrid button example
Forum: IntraWeb General Discussion
Last Post: joelcc
04-16-2024, 09:07 PM
» Replies: 0
» Views: 158

 
  SendFile
Posted by: denville - 09-11-2019, 01:11 PM - Forum: IntraWeb General Discussion - No Replies

C++ Builder XE7 (32-bit build)
IW 15.0.22

WebApplication->SendFile( SelFspec, true );

Any attempt to download a file from the browser fails.

For example, SelFspec = "SYS_LOG-2019.txt"

Browser (Firefox and Chrome) error:

File copy Failed. The file "/sam-dat/logs/SYS_LOG-2019.txt.tmp" could not be created. The system cannot find the path specified

Help ??  Thanks


Sorry, just re-read the note "Some reminders about SendFile" - now seems to be working with my installed versions of Chrome and Firefox.

Print this item

  TIWLink not disabled
Posted by: matija - 09-10-2019, 06:49 AM - Forum: IntraWeb General Discussion - Replies (2)

I have TIWLink (hyperlink) which over time enabled/disabled.

Why at disabled not change format (gray) as other component ?

Can i solve this in HTML template or JS?

Print this item

  ajaxCall question
Posted by: joel - 09-10-2019, 04:15 AM - Forum: IntraWeb General Discussion - Replies (5)

Can someone explain the parameters in the ajaxCall functions?

Thanks

iw15.1.4

Print this item

  Possibile errors in IWBootStrap Library
Posted by: Anto90 - 09-09-2019, 01:14 PM - Forum: IntraWeb General Discussion - Replies (13)

Good afternoon.
I write for possible errors on the Bootstrap library.
I have attached an example project.
1)
I have an iwbsinputform with iwbsfile and an iwbsbutton inside it. I put the ButtonType property btsubmit. The onsubmit event with this code is associated with the iwbsinputform:

if aRequest.Files.Count> 0 then
begin
FileUpload: = THttpFile (aRequest.Files [aRequest.Files.Count - 1]). FileName;
WebApplication.ShowMessage ('File upload name:' + FileUpload);
end
else
WebApplication.ShowMessage ('No file selected');

After executing this code I get the error 404 - Not found. I think it's two to the rewriting of the iwbsrestserver.pas unit and the change in the management of callbacks in Intraweb 15.1.4.
2) In the iwbsradiobutton component the OnAsyncClick event does not fire and the Checked property when it changed is always False if I try to read it from code.

3) HiddenInput

I have a callback registered in the form
WebApplication.RegisterCallBack ('CalcolateValue', CalcolateValue);

In a CalcolateValue procedure:
js: = Format ('addHiddenInput ("% s",% s);', ['Test_Input', 'Test ()']);
WebApplication.CallBackResponse.AddJavaScriptToExecute (js);

the javascript function is defined as follows:

with JavaScript do
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 ('');
Add ('function Test ()');
Add ('{');
Add ('return 5;');
Add ('}');
end;

In a button in the scriptevents property I have
ajaxCall ("CalcolateValue", "& CallBack = 1", false);

and in the AsyncCLick event I have:
  Value: = EventParams.Values ['Test_Input'];
  WebApplication.ShowMessage (Value);

When I run ajaxcall the callback is executed but then in the button in the AsyncClick event the Value returned is always empty and not 5 as it should be. (In the same button is it possible to return the value of the variable through the callbak?)
(I use intraweb 15.1.4 and iwbootstrap 3.4.1)
Thanks for your help

Andrea



Attached Files Thumbnail(s)
   

.zip   Example.zip (Size: 54.88 KB / Downloads: 9)
Print this item

  Session should be expired
Posted by: OronzoConte - 09-09-2019, 08:40 AM - Forum: IntraWeb General Discussion - Replies (8)

Hallo,
when a user of my IW application exits the browser I know that, after 20 minutes, the user usersession is destroyed. In my personal log I see that DM is freed etc.

Your Session Log viewer shows:
Created at: 07/09/2019 11:42:44

Destroyed at: The session was still active when this file was last written to.
Remote IP address: 37.159.85.203
Browser name: Chrome Mobile
Browser user agent string: Mozilla/5.0 (Linux; Android 7.0; BAH-L09) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
Duration: 1 day 21 hours 40 seconds
Request count: 47
Last Access: 07/09/2019 11:46:51
This session should be expired!



After this event, new sessions are created but not started ulnti servive is terminated ans started.
For every new Your  Session Log Wiewer shows:
Created at: 07/09/2019 18:44:12
Destroyed at: The session was still active when this file was last written to.
Remote IP address: 188.216.208.23
Browser name: Chrome Mobile
Browser user agent string: Mozilla/5.0 (Linux; Android 8.1.0; SM-T585) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
Duration: 1 day 13 hours 59 minutes 11 seconds
Request count: 1
Last Access: 07/09/2019 18:44:12
This session should be expired!


Only one event ( "Created") is whowed for the session

I am using IW 15.1.4 and dont kow if this was happening in IW 14...

Can you suggest me on what to ckeck or how can I solve this problem?
Thank you for your time.
Best regards.
Oronzo Conte

Print this item

  Using CGI exe with IW
Posted by: cprmlao@hotmail.com - 09-08-2019, 09:06 PM - Forum: IntraWeb General Discussion - Replies (23)

Hi, I have a cgi exe of a third party that I need using to use with IW.
It works well using apache, IIS, AppServer ......

But I want to use IW.

The cgi.exe is named dgate.exe.

I did all setup after read the docs of cgi to use with a webserver.

It said just to copy a folder called cgi-bin  to wwwroot of the webserver.

To test I have to use: http://127.0.0.1:8888/cgi-bin/newweb/dgate.exe?mode=top

I did a test using a button click that run this code:

Code:
procedure TIWUserSession.load_dicom();
var
  CGIRunner: TIWCGIRunner;
  CGIModuleName: string;
  LFileName: string;
begin
  CGIModuleName := TIWAppInfo.GetAppPath + 'wwwroot\cgi-bin\newweb\dgate.exe';
  CGIRunner := TIWCGIRunner.Create;
  try
    // Set the name of the CGI module which runs our report
    CGIRunner.CGIModule := CGIModuleName;
    CGIRunner.CustomFields.Add('mode=top');
    // call the CGI application
    CGIRunner.Execute(WebApplication, WebApplication.Request);
    // Check status result. Zero indicates success. Anything else is an error
    if CGIRunner.StatusResult = 0 then
    begin
      //what I have to do here????
    end else
    begin
      WebApplication.ShowMessage('Error creating report: ' + CGIRunner.ErrorMessage);
    end;
  finally
    CGIRunner.Free;
  end;
end;

Here is the lua script executed by "dgate.exe" cgi to produce the html output:

Code:
HTML("Content-type: text/html\nCache-Control: no-cache\n");
HTML("<HEAD>")
print [[<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">]]
HTML("<TITLE>Conquest DICOM server - version %s</TITLE>", version)

HTML("</HEAD>")

HTML("<BODY BGCOLOR='CFDFCF'>")


HTML("<H1>Welcome to Conquest DICOM server - version %s</H1>", version)
HTML("<H2>Written by Conquest Project</H2>", version)
HTML("<IMG SRC='%sconquest.jpg' ALT='Written by Conquest Project'>", Global.WebCodeBase)
HTML("<HR>")

HTML("<HR>");

HTML("<table>");
key='' 
HTML("<tr>");
HTML("<FORM ACTION=\"dgate%s\"  onSubmit=\"if (this.patientnamematch.value == '' && this.patientidmatch.value == '') {alert('Please, fill the entry fields');return false;}\">", ex);
HTML("<INPUT NAME=mode    TYPE=HIDDEN VALUE=listpatients>");
HTML("<INPUT NAME=port    TYPE=HIDDEN VALUE=%s>", port);
HTML("<INPUT NAME=address TYPE=HIDDEN VALUE=%s>", address);
HTML("<INPUT NAME=key    TYPE=HIDDEN VALUE=%s>", key);
HTML("<td>Local Patient List");
HTML("<td>Patient ID: <INPUT NAME=patientidmatch TYPE=Text VALUE=>");
HTML("<td>Name: <INPUT NAME=patientnamematch TYPE=Text style=\"text-transform:uppercase;\" onkeyup=\"javascript:this.value=this.value.toUpperCase();\" VALUE=>");
HTML("<td>");
HTML("<td><INPUT TYPE=SUBMIT VALUE=Submit>");
HTML("</FORM>");
HTML("</tr>");

HTML("<tr>");
HTML("<FORM ACTION=\"dgate%s\" onSubmit=\"if (this.patientnamematch.value == '' && this.patientidmatch.value == '' && this.studydatematch.value == '') {alert('Please, fill the entry fields');return false;}\">", ex);
HTML("<INPUT NAME=mode    TYPE=HIDDEN VALUE=liststudies>");
HTML("<INPUT NAME=port    TYPE=HIDDEN VALUE=%s>", port);
HTML("<INPUT NAME=address TYPE=HIDDEN VALUE=%s>", address);
HTML("<INPUT NAME=key    TYPE=HIDDEN VALUE=%s>", key);
HTML("<td>Local Studies List");
HTML("<td>Patient ID: <INPUT NAME=patientidmatch TYPE=Text VALUE=>");
HTML("<td>Name: <INPUT NAME=patientnamematch TYPE=Text style=\"text-transform:uppercase;\" onkeyup=\"javascript:this.value=this.value.toUpperCase();\" VALUE=>");
HTML("<td>Date: <INPUT NAME=studydatematch id=studydatematch TYPE=Text VALUE=>");
HTML("<td><INPUT TYPE=SUBMIT VALUE=Submit>");
HTML("<tr><td><td><td><td>")
HTML([[<INPUT TYPE=BUTTON VALUE=Today onClick="var d=new Date(); document.getElementById('studydatematch').value=(d.getFullYear()).toString()+(d.getMonth()+101).toString().substring(1,3)+(d.getDate()+100).toString().substring(1,3)">]]);
HTML([[<INPUT TYPE=BUTTON VALUE=Yesterday onClick="var d=new Date(); d=new Date(d.valueOf()-864E5); document.getElementById('studydatematch').value=(d.getFullYear()).toString()+(d.getMonth()+101).toString().substring(1,3)+(d.getDate()+100).toString().substring(1,3)">]]);
HTML([[<INPUT TYPE=BUTTON VALUE='Last 7 days' onClick="var d=new Date(); var d1=new Date(d.valueOf()-7*864E5); document.getElementById('studydatematch').value=(d1.getFullYear()).toString()+(d1.getMonth()+101).toString().substring(1,3)+(d1.getDate()+100).toString().substring(1,3)+'-'+(d.getFullYear()).toString()+(d.getMonth()+101).toString().substring(1,3)+(d.getDate()+100).toString().substring(1,3)">]]);
HTML("</FORM>");
HTML("</tr>");


HTML("</table>");
HTML("</BODY>")



The cgi generate  a html page on the fly using your internal code with lua script. I can´t change that lua script from cgi.

How could I take the html page generated by dgate.exe to put after "if CGIRunner.StatusResult = 0 then" and show in the browser? 

Print this item

  IdHttp.ReadTimeout has no affect on Android when https fails
Posted by: JayBart - 09-07-2019, 03:01 PM - Forum: Indy General Discussion - Replies (2)

My DSL ISP had a weird outage the last 2 days.
Accessing https sites did not work, while http worked fine. Also tls did not work like in SMTP StartTls.
I disabled StartTls and then could send emails.
I have not understood the actual reason, but took that rare opportunity to check my FMX apps.

It uses TIdHTTP accessing a https webpage
I already had set ConnectTimeout:= 2000;
but it still blocked.
Setting ReadTimeout:= 8000; helped, it timed out after 11 sec. It was always 3 sec longer than ReadTimeout.
Perfect on Windows!

But on Android ReadTimeout did not help , it still blocked forever.

I tried Berlin (Indy 10.6.2.5341) and Seattle (Indy 10.6.2.5467)

Q:
Is there a solution to get a timeout on Android?

Unfortunately I can't test this scenario anymore, my ISP now works normally again

Print this item

  How do I create an additional data module for a Session?
Posted by: RedOctober - 09-07-2019, 02:19 PM - Forum: IntraWeb General Discussion - Replies (3)

I'm tasked with maintaining a very old Delphi XE7, IntraWeb 14 (I think.. how do I determine the IW version number installed?), OS: Windows Server 2008

The IntraWeb app is working well.  It connects to a Firebird database and all the DB connection components (DAC by DevArt version 5.5.16) are in the UserSessionUnit.

My task is to allow this old app to connect to an additional Firebird database.  The company is upgrading all their apps, and they all point to a new Firebird database that has a different internal table and field structure (both "old" and "new" DBs are Firebird 3x, just different tables and fields).  The Intraweb app is a "helper" app, not the main one, so it must be made to bridge the gap between old and new.

I've done this before, many years ago, but forgot the best way to code this.  Here is my plan:

- Leave everything that is working, alone
- With your generous help, code the few lines in the few places necessary, to create an additional datamodule for the user session.
- Copy everything from the existing working UserSessionUnit to the newly created-on-the-fly datamodule (All component names can remain the same this way, making other code adjustments easier.  Only the datamodule the components and code point to, need be changed.)
- In the .ini file, put a flag that tells the IntraWeb app to use the old DB or the new one. (I'll flip this on "switch over" day from old DB to new DB)
- Make adjustments in the code to point to the appropriate datamodule and thereby the appropriate DB as indicated by the parameter in the above step

Question:

- I need step by step instructions on how to add an additional data module to the IW / Delphi XE7 app, starting right from the menus in XE7, to the final coding snippets and tell me the units to put them in.

Thank you for any help you can provide.

Print this item

  Setup IWGrid visibility in OnAsyncClick event
Posted by: brsoft - 09-07-2019, 09:27 AM - Forum: IntraWeb General Discussion - Replies (4)

Hi

Simple bug in IW15.1.4, but very annoying.
OnAsyncClick Event:
                        IWGrid1.visible: = not IWGrid1.visible;
... and the position of the Grid is moving!
(The position is correct for the OnClick event.)

Other components have no such error.

Error presentation:
http://95.140.46.153/gridvisibletest


Can you help me with this?


Best regards
brsoft

Code:
type
  TIWForm1 = class(TIWAppForm)
    IWGrid1: TIWGrid;
    IWButton1: TIWButton;
    IWButton2: TIWButton;
    procedure IWButton1AsyncClick(Sender: TObject; EventParams: TStringList);
    procedure IWButton2Click(Sender: TObject);
  public
  end;

implementation
{$R *.dfm}

procedure TIWForm1.IWButton1AsyncClick(Sender: TObject; EventParams: TStringList);
begin
IWGrid1.Visible:=not IWGrid1.Visible;
end;

procedure TIWForm1.IWButton2Click(Sender: TObject);
begin
IWGrid1.Visible:=not IWGrid1.Visible;
end;



Attached Files
.zip   gridvisibletest.zip (Size: 5.37 KB / Downloads: 0)
Print this item

  Delphi Rio 10.3.2 IW 14.2 Debugger Not Working?
Posted by: stephenwardhw - 09-06-2019, 11:58 PM - Forum: IntraWeb General Discussion - Replies (3)

I am new to IntraWeb and am trying it out for the first time.  However when I drop a breakpoint on the code in the Form unit it does not seem to trigger correctly.  Does Intraweb support the Delphi debugger?  If so does anyone have any suggestions that I may try to get that working.

Thanks in advance for any suggestions.

Print this item