Fixed form submit in search input field

form submit in
This commit is contained in:
Andre Lorbach 2014-10-23 11:27:44 +02:00
parent 17e1280927
commit 402b229651
2 changed files with 16 additions and 5 deletions

View File

@ -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);
}
}
function MoveToButtonOnKeypress ( szButton, event )
{
if (event.keyCode == 13) {
event.preventDefault();
$( "#" + szButton ).focus();
$( "#" + szButton ).click();
$("#loading_dialog").loading();
return false;
}
}

View File

@ -27,7 +27,7 @@
<!-- ENDIF EnablePredefinedSearches="true" -->
<td align="center" nowrap valign="top">
<td nowrap align="center" nowrap valign="top">
<input maxlength="2048" name="filter" size="80" title="Search" value="{searchstr_htmlform}" class="ui-widget-content SearchFormTextbox">
<input maxlength="2048" name="filter" size="80" title="Search" value="{searchstr_htmlform}" class="ui-widget-content SearchFormTextbox" onkeypress="MoveToButtonOnKeypress('buttonsearch', window.event);">
</br>
<button id="buttonsearch"><span class="ui-icon ui-icon-search" title="{LN_SEARCH}" style="float:left;"></span><span class="ui-button-text">{LN_SEARCH}</span></button>
<!-- IF enabledoraclesearchstr="true" -->
@ -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;
})