Handle search with Ajax. re #73
This commit is contained in:
parent
ad286e491e
commit
4410a5cc82
|
@ -8,7 +8,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="tool" style="display: none">
|
<div id="tool" style="display: none">
|
||||||
<div style="float: left; width: 60%">
|
<div style="float: left; width: 60%">
|
||||||
<form action="index.php" method="get">
|
<form id="searchForm" action="index.php" method="get">
|
||||||
<div style="float: right">
|
<div style="float: right">
|
||||||
<input type="image" src="images/search32.png?v={{=it.const.version}}" alt="{{=it.const.i18n.searchAlt}}" />
|
<input type="image" src="images/search32.png?v={{=it.const.version}}" alt="{{=it.const.i18n.searchAlt}}" />
|
||||||
</div>
|
</div>
|
||||||
|
|
7
util.js
7
util.js
|
@ -94,6 +94,13 @@ function updatePage (data) {
|
||||||
|
|
||||||
$(".fancyabout").fancybox(fancyBoxObject ('COPS ' + currentData.version, 'ajax'));
|
$(".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);
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue