Line # Revision Author
1 627 ahitrov <script type="text/javascript">
2 <!--
3 $(document).ready(function(){
4 628 ahitrov $('#start-search-by-id').on('click', function( ev ){
5 ev.preventDefault();
6 var oForm = document.forms['search_doc_by_id'];
7 var oField = oForm.elements['order_id'];
8 if ( oField.value.length > 0 ) {
9 $('#search-by-id-prompt').html('');
10 $.ajax({
11 'url' : '/contenido/webshop/ajax/order_id.html',
12 'data' : { 'id' : oField.value },
13 'dataType' : 'json',
14 'success' : function( data ){
15 if ( data.error ) {
16 $('#search-by-id-prompt').html('<div class="err">' + data.error + '</div>');
17 }
18 if ( data.success ) {
19 $('#search-by-id-found').html( data.html );
20 }
21 }
22 });
23 }
24 });
25 627 ahitrov });
26 //-->
27 </script>
28 626 ahitrov <fieldset>
29 <legend>Поиск заказа по номеру</legend>
30 627 ahitrov
31 <form name="search_doc_by_id" action="" method="GET" target="_blank">
32 <table width="100%" border="0" cellpadding="0" cellspacing="6" class="tform">
33 628 ahitrov <tr><td><b>Наберите номер заказа:</b></td></tr>
34 <tr><td><input type="text" name="order_id" style="width:99%"></td>
35 <td><input type="button" id="start-search-by-id" value="Найти" class="btn"></td></tr>
36 627 ahitrov </table>
37 </form>
38 628 ahitrov
39 <div id="search-by-id-prompt"></div>
40 626 ahitrov
41 </fieldset>