on 05-31-2016 6:03 PM
Hi,
There is a function, myLib(), defined in a script A in screen A, and I want to call this function from script B in screen B.
I experienced that sometimes personas works, but sometimes it reported that the lib function is undefined. Why?
When I use the script id, do I have to add screen number or tcode as well?
I also experienced that some other event was triggered in such way.
Thanks in advance.
Dong
Hi,
please take a look at the following KBA Scripting: Including Global Javascript Libraries - SAP Imagineering - SCN Wiki
for the "official" way of using scripting libraries.
If you just need your flavor to work in the WebGui, then you can can just attach your library to the browser's window object. You can do this in an onLoad script. The library should then live until you refresh the browser. You can create window objects explicitly by "window.mylib = ..." or by omitting the "var" keyword when defining a variable e.g. "mylib=...". The key is that you have to define/initialize your library at a central location that you are sure will be called first by all users.
Cheers,
Clemens
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.