Handle search with Ajax. re #73
This commit is contained in:
parent
ad286e491e
commit
4410a5cc82
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
<div id="tool" style="display: none">
|
||||
<div style="float: left; width: 60%">
|
||||
<form action="index.php" method="get">
|
||||
<form id="searchForm" action="index.php" method="get">
|
||||
<div style="float: right">
|
||||
<input type="image" src="images/search32.png?v={{=it.const.version}}" alt="{{=it.const.i18n.searchAlt}}" />
|
||||
</div>
|
||||
|
|
7
util.js
7
util.js
|
@ -95,6 +95,13 @@ function updatePage (data) {
|
|||
$(".fancyabout").fancybox(fancyBoxObject ('COPS ' + currentData.version, 'ajax'));
|
||||
}
|
||||
|
||||
$("#searchForm").submit (function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
var url = strformat ("index.php?page=9¤t={0}&query={1}&db={2}", currentData.page, $("input[name=query]").val (), currentData.databaseId);
|
||||
navigateTo (url);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function ajaxifyLinks () {
|
||||
|
|
Loading…
Reference in a new issue