Are OnKeyPress events allowed in a custom item in a MediaLab questionnaire or are they intercepted/not recognized by MediaLab? Thanks.
Are OnKeyPress events allowed in a custom item in a MediaLab questionnaire or are they intercepted/not recognized by MediaLab? Thanks.
MediaLab uses Internet Explorer as its web engine so it should act exactly as it does in IE. It should accept onkeypress events in the same manner as any page in IE would. However, one difference is that the HTML window within MediaLab will need to have the "focus". Your javascript programmer will likely be able to cause this to happen automatically but you can also do it manually to test it. For the test, try clicking on the HTML page once before the onkeypress function is to be tested. Otherwise, the keypress may go to the MediaLab shell rather than to the contained HTML page.
[edited followup from support email]
Thank you so much. My programmer here was able (after several attempts) to set the "focus" so that my custom item now works through MediaLab. I am much relieved!
Have a great weekend
Any chance you might consider zipping and posting the item (including the focus setting code) for others who run into the same challenge? If it's top-secret, no worries--thanks for the update!
Attached is the file with the html code that changes the focus of a custom item.