/    Sign up×
Community /Pin to ProfileBookmark

Form Input Type=Text Not Updating Prior to Validation Routine

Hi:

This is a rather complex situation. We have several <forms> within an HTML page. In an onBlur event, we update an input text field within one document form via a JavaScript function. It works UNLESS you hit the Enter key. The JavaScript validation function recognizes the OLD input text field, not the updated one with one exception: if we code an alert referencing this text field just BEFORE the validation function is called, it works perfectly – the valication function receives the updated text field (as it does in all other cases – change, blur, click, etc.) It is just the enter key that causes this abnomaly. It appears the document is retaining two versions of the text field – the one the user just keyed and the one we update.

Anyone have any ideas? I can submit additional information about page setup, etc.

Thanks.

Karen?

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @knally spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...