Reply To:

  • Liz Larsen

    Member
    October 6, 2022 at 7:01 pm
    Points: 5,232
    Rank: UC2 Brainery Purple Belt UC2 Brainery Purple Belt Rank

    First of all, this is a really clever system.

    Next, for the dropdowns, I noticed the trigger was set to “on blur” rather than the standard “mouse up”. Can you explain your reasoning? I never use it in Bluebeam forms and am genuinely curious as to when/why I might want to.

    I ask because for the “on blur” to trigger, you actually have to click outside of the dropdown. So, for example, I can change one of the dropdowns from 3 to 4, and you won’t see the update of an additional line until I, the user, actively click outside of the dropdown box (or tab, or hit enter). Whereas if you use “mouse up”, the change happens immediately.

    I suspect (but have no way of knowing for certain) that the lag issue is caused by so many “global scripts” rather than storing the scripts within the individual form fields’ JavaScript.

    Also, if I were you, I would perhaps find a way to use regex to reduce the need for the verbosity that currently exists. There is a coding principal that I’m quite fond of called DRY (Don’t Repeat Yourself). I think you could reduce the number of scripts (Set Taps Box 1, Set Taps Box 2, etc…) and reduce the length of the scripts themselves (FindOCG(“6-1”), FindOCG(“6-2”), etc…) by using regular expressions to loop through these, thereby reducing the amount of code you have.

    Again, really clever use of forms and JavaScript here. I only spent about 15 minutes looking over your sheet, so I’m probably missing some intricacies of how everything works. Feel free to reach out for further discussion. I love what you’ve accomplished so far.