<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[TIP: Trigger button click on enter]]></title><description><![CDATA[<p dir="auto">I would like to trigger the login button when a user clicks on the enter key in a password field.</p>
<p dir="auto">I found the following code on w3schools:</p>
<pre><code>var input = document.getElementById("passwordField");



    // Execute a function when the user releases a key on the keyboard

    input.addEventListener("keyup", function(event) {

        // Number 13 is the "Enter" key on the keyboard

        if (event.keyCode === 13) {

            // Cancel the default action, if needed

            event.preventDefault();

            // Trigger the button element with a click

            document.getElementById("loginButton").click();

        }

    });
</code></pre>
<p dir="auto">Don't forget to specify the id's for the password field and login button, in this case 'passwordField' and 'loginButton'</p>
<p dir="auto"></p><div class="plugin-markdown"><input type="checkbox" checked="true" />click button when user clicks enter key in input field(s) ... or something similar <img src="https://community.appdrag.com/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=lfk1vimvd74" class="not-responsive emoji emoji-android emoji--wink" title=";-)" alt="😉" /></div><p></p>
]]></description><link>https://community.appdrag.com/topic/488/tip-trigger-button-click-on-enter</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Jul 2026 04:04:54 GMT</lastBuildDate><atom:link href="https://community.appdrag.com/topic/488.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 11 Nov 2020 11:31:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to TIP: Trigger button click on enter on Wed, 11 Nov 2020 18:40:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.appdrag.com/uid/2">@Wassim</a> perhaps it's an idea, but that's up to you and the number of users this might be useful to ...</p>
]]></description><link>https://community.appdrag.com/post/1835</link><guid isPermaLink="true">https://community.appdrag.com/post/1835</guid><dc:creator><![CDATA[Dick Honing]]></dc:creator><pubDate>Wed, 11 Nov 2020 18:40:07 GMT</pubDate></item><item><title><![CDATA[Reply to TIP: Trigger button click on enter on Wed, 11 Nov 2020 13:57:30 GMT]]></title><description><![CDATA[<p dir="auto">Hi again,</p>
<p dir="auto">I'm not sure, is it a feature request for Cloud Backend Inputs?</p>
]]></description><link>https://community.appdrag.com/post/1832</link><guid isPermaLink="true">https://community.appdrag.com/post/1832</guid><dc:creator><![CDATA[Wassim]]></dc:creator><pubDate>Wed, 11 Nov 2020 13:57:30 GMT</pubDate></item><item><title><![CDATA[Reply to TIP: Trigger button click on enter on Wed, 11 Nov 2020 11:32:34 GMT]]></title><description><![CDATA[<p dir="auto">link to w3shools 'How TO' page ... <a href="https://www.w3schools.com/howto/howto_js_trigger_button_enter.asp" rel="nofollow ugc">https://www.w3schools.com/howto/howto_js_trigger_button_enter.asp</a></p>
]]></description><link>https://community.appdrag.com/post/1827</link><guid isPermaLink="true">https://community.appdrag.com/post/1827</guid><dc:creator><![CDATA[Dick Honing]]></dc:creator><pubDate>Wed, 11 Nov 2020 11:32:34 GMT</pubDate></item></channel></rss>