03-22-2023, 10:21 AM
(This post was last modified: 03-22-2023, 05:06 PM by StephB.
Edit Reason: minor syntax
)
Dear all,
I want to add some JS features to my IW app, and something (probably me) went wrong.
I try to follow the method describes here (http://docs.atozed.com/docs.dll/developm...cript.html), and I don't understand where is(are) my mistake(s).
I created a JS file in my project (right-click on the project then Add new \ Other \ Web \ Javascript), and named it IW_JS_ScrollLesson.js.
The file exists in the root path of my app with the other sources, but it's not added to the dproj file.
In the unit where I want to use my JS script (uLesson), I added :
- IWServerInternalFiles in the uses list
- {$R IW_JS_ScrollLesson.js}
- the following lines in the form.FormShow to load/join the script:
When I try to compile/execute my app, I have the following error :
I don't understand where I am wrong, is anybody already applied this method, or have another method to use a JS script in my app ?
I read some pages on this forum, but don't undertand the other methods (I'm a newcomer in Delphi/Intraweb world).
Many thanks for your help.
I want to add some JS features to my IW app, and something (probably me) went wrong.
I try to follow the method describes here (http://docs.atozed.com/docs.dll/developm...cript.html), and I don't understand where is(are) my mistake(s).
I created a JS file in my project (right-click on the project then Add new \ Other \ Web \ Javascript), and named it IW_JS_ScrollLesson.js.
The file exists in the root path of my app with the other sources, but it's not added to the dproj file.
In the unit where I want to use my JS script (uLesson), I added :
- IWServerInternalFiles in the uses list
- {$R IW_JS_ScrollLesson.js}
Code:
implementation
{$R *.dfm}
{$R IW_JS_ScrollLesson.js}
...
- the following lines in the form.FormShow to load/join the script:
Code:
procedure TIWFormLesson.IWAppFormShow(Sender: TObject);
begin
inherited;
gInternalFiles.Add('IW_JS_ScrollLesson.js', '/js/ScrollLesson.js');
Self.PageContext.ScriptFiles.Add('/js/ScrollLesson.js');
...
When I try to compile/execute my app, I have the following error :
Quote:[dcc32 Error] E2161 Error: RLINK32: Unsupported 16bit resource in file "C:\awelter\Server\AW_OnlineSelfTraining\IW_JS_ScrollLesson.js"
I don't understand where I am wrong, is anybody already applied this method, or have another method to use a JS script in my app ?
I read some pages on this forum, but don't undertand the other methods (I'm a newcomer in Delphi/Intraweb world).
Many thanks for your help.