Page 3 of 3

Re: F-Keys on 5250 Windows

Posted: Wed Feb 05, 2014 7:18 pm
by Scott Klement
Ahhh, I see what the problem is. I didn't notice this before, but... you changed the line immediately before the one I asked you to insert.

Here's what it looks like (this is from the screenshot you posted in the RTF file earlier):
linkmenu4.png
linkmenu4.png (109.28 KiB) Viewed 1444 times
So the error messages you posted say that you can't called toLowerCase on line 222, because input.fkey is not defined (and therefore does not have a toLowerCase() method.) This shouldn't ever happen because on line 212, we check if input.fkey==null -- and that will skip any elements where input.fkey is not defined. However, you changed that code on line 212 -- you changed it from input.fkey==null to input.fkey===null (originally it was two equal signs, you changed it to three.)

The problem is, with three equal signs, an undefined element will not be converted to a null for comparison, so the test will no longer find situations where fkey is undefined. With two equal signs it will.

I suspect you did this because the ace editor (the JavaScript editor in the Genie admin) gives a warning when you use two equal signs with null, so you changed it to three, as it suggests. However, in this case, that's not the right thing to do... you'll need to change it back to two equal signs (or change the way it works slightly.)

Re: F-Keys on 5250 Windows

Posted: Thu Feb 06, 2014 11:37 am
by khoreis
I had made those changes yesterday afternoon, but without success...until today. I suspect it has something to do with Chrome, and it's reload/refresh. Thanks for your help with this.

Re: F-Keys on 5250 Windows

Posted: Thu Feb 06, 2014 4:04 pm
by Scott Klement
If it helps, Chrome has an option that lets you disable caching while you have the developer tools open. To enable it, click Tools / Developer Tools. This opens up the dev tools -- has stuff like network monitor, JavaScript debugger, etc, these are useful if you're going to do a lot of JS programming. Now click the gear icon in the top-right of the developer tools. On the settings page, click the checkbox for "Disable cache (while Dev Tools is open)".

Then, when you're making changes like this, you can just open the dev tools to disable the cache. Once you have everything working, you can close the dev tools again and it'll start caching your JS again (to improve performance.)