Executing js code on exfmt

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
DanWoitalla
New User
Posts: 2
Joined: Mon Jul 17, 2017 4:13 pm
First Name: Dan
Last Name: Woitalla
Company Name: Prime Therapeutics LLC
Contact:

Executing js code on exfmt

Post by DanWoitalla »

I have some js code that I want to execute after an EXFMT. How do I do that? Sorry, I'm sure it's easy, but I can't figure it out - still relatively new to the tool.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Executing js code on exfmt

Post by Scott Klement »

You would either put the JavaScript code into an event in your display file, or write it as a function, and call the function from an event.

It's not clear what you mean by "after an exfmt", so I don't know which event to suggest.

If you want to run the code as soon as the screen loads, you'd put it in the "onload' event of the record format. If you want to run the code when the screen is submitted bacm to the IBM i, it'd run in the 'onsubmit' event, etc.
DanWoitalla
New User
Posts: 2
Joined: Mon Jul 17, 2017 4:13 pm
First Name: Dan
Last Name: Woitalla
Company Name: Prime Therapeutics LLC
Contact:

Re: Executing js code on exfmt

Post by DanWoitalla »

Thanks - I got it. I put the js code on my record formats onload event.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest