Skip to main content
Question

Update Value Without Clicking Outside of Field?

  • May 24, 2017
  • 0 replies
  • 95 views

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!
This topic has been closed for replies.

Can the data entry be a drop down list, or does it need to be free form?

  • Author
  • Registered
  • May 24, 2017
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.

AdamKeever1
Forum|alt.badge.img+2
  • Registered
  • July 23, 2019
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?