Skip to main content

Trying to add JS to a data label, that will select a specific button if the enter key is pressed from within a specific text box. 

 

<script>
$('(name="text box"]').keypress(function(event)
   
    { if(event.keyCode == 13)
    { $('Âname="button"]').click(); }
    });
</script>
 
Tried this script here, but nothing happens on the keypress. 

Found the issue, in case others run into something similar. It looks like this script will not run for a picture click. I changed the search action to a button and the script ran perfectly on a button. 


Reply