Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Working with Javascript
#1
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}
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.
Reply


Messages In This Thread
Working with Javascript - by StephB - 03-22-2023, 10:21 AM
RE: Working with Javascript - by StephB - 03-23-2023, 08:53 AM
RE: Working with Javascript - by valmeras - 03-23-2023, 07:17 PM
RE: Working with Javascript - by valmeras - 03-23-2023, 11:27 PM
RE: Working with Javascript - by jeroen.rottink - 03-24-2023, 10:18 AM
RE: Working with Javascript - by StephB - 03-28-2023, 04:56 PM
RE: Working with Javascript - by valmeras - 06-28-2024, 08:29 AM
RE: Working with Javascript - by Comograma - 06-28-2024, 01:55 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)