Handle search with Ajax. re #73

This commit is contained in:
Sébastien Lucas 2013-06-18 22:24:35 +02:00
parent ad286e491e
commit 4410a5cc82
2 changed files with 8 additions and 1 deletions

View file

@ -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>

View file

@ -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&current={0}&query={1}&db={2}", currentData.page, $("input[name=query]").val (), currentData.databaseId);
navigateTo (url);
});
}
function ajaxifyLinks () {