F-Keys on 5250 Windows

Use this board to ask questions or have discussions with other Genie users.
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: F-Keys on 5250 Windows

Post 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 1264 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.)
khoreis
New User
Posts: 16
Joined: Tue May 21, 2013 5:02 pm
First Name: Kevin
Last Name: Horeis
Company Name: Old World Industries
Phone: 847 559-2026
Contact:

Re: F-Keys on 5250 Windows

Post 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.
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: F-Keys on 5250 Windows

Post 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.)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests