diff --git a/src/js/common.js b/src/js/common.js index d3f13f0..40601a2 100644 --- a/src/js/common.js +++ b/src/js/common.js @@ -438,7 +438,6 @@ function HoverPopupMenuHelp( myEvent, parentObj, myPopupTitle, HoverContent ) /* * New JQUERY Helper functions */ - function CreateMenuFunction ( szbuttonobjid, szmenuobjid, bHide ) { // Popup Menu Code @@ -573,4 +572,16 @@ function CreateLoadingHelper ( szLoadingText ) } }); })(jQuery); -} \ No newline at end of file +} + +function MoveToButtonOnKeypress ( szButton, event ) +{ + if (event.keyCode == 13) { + event.preventDefault(); + $( "#" + szButton ).focus(); + $( "#" + szButton ).click(); + $("#loading_dialog").loading(); + return false; + } + +} diff --git a/src/templates/index.html b/src/templates/index.html index 37fffc9..76f39e8 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -27,7 +27,7 @@ - +
@@ -41,8 +41,8 @@ // Custom Buttons $("#buttonsearch").button() .click(function() { - // Perform Button Click now! - window.location.href = $(ui.item).find('form').submit(); + // Perform Form Submit! Click now! + $("#searchform").submit(); // Make sure to return false here or the click registration above gets invoked. return false; })