Discussions

 View Only
  • 1.  Update Value Without Clicking Outside of Field?

    Posted 05-24-2017 17:08
    Is there a way to update the value in a field without having to click elsewhere on the page first?

    I have a page with a single text entry field and a formula URL "Enter" button that compares the value in the field with an existing value when clicked. I've noticed that the formula does not update until the user clicks outside of the text field in question after entering a value. If I enter a value and immediately click the button it updates the value and does nothing (must be clicked again to work) or if I hit the enter/return key, it does not compare the current value and comes up wrong. Can I ensure that the formula URL updates as text is entered into the input box? Can provide more details, if necessary. Thanks!


  • 2.  RE: Update Value Without Clicking Outside of Field?

    Posted 05-24-2017 17:49
    Can the data entry be a drop down list, or does it need to be free form?


  • 3.  RE: Update Value Without Clicking Outside of Field?

    Posted 05-24-2017 18:38
    Has to be free form, due to the nature of the page's functionality.


  • 4.  RE: Update Value Without Clicking Outside of Field?

    Posted 05-24-2017 19:52
    I haven't fully implemented this but I think I figured it out. Using Dan's world famous IOL technique and handy dandy JavaScript, I am going to add an "oninput" event to the input element and trigger the OnBF(this) that is normally triggererd when the element is blurred (or no longer selected, as happens when we click outside of the input field). This way, every time the user types a new character, the input element performs the same action as when we click away from it, thus updating the formula for the "Enter" button.

    _EDIT:_ I did also have to add an "onkeypress" event handler to the text box to click the button as well because hitting the enter/return key was not registering as clicking the "Enter" button because it is a link element rather than a form submit.


  • 5.  RE: Update Value Without Clicking Outside of Field?

    Posted 07-23-2019 05:17
    Hello. Don't suppose you happen to have the code handy still, do you? I'm attempting to address a very similar problem. Thanks!


  • 6.  RE: Update Value Without Clicking Outside of Field?

    Posted 07-23-2019 12:10
    Dan posted a pastie for doing an automated reload of a home page. It works and you can adjust the time:

    <script>
      setTimeout(function(){
         parent.location.reload(1);
      }, 180000);
    </script>

    Maybe try the .reload(1) function with the "oninput" event?