if defined B_PROLOG_INCLUDED B_PROLOG_INCLUDED true die script functio

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<script>
function errorCallBack(err)
{
alert(err);
}
function callBack(content)
{
var products = document.getElementById("products_list_span");
products.innerHTML = content;
}
function showProducts()
{
var x = document.getElementById("vendor_list").selectedIndex;
var id = document.getElementById("vendor_list")[x].value;
sendRequest("/bitrix/templates/new_puresoft/ajax_vendor_sel.php?ID="+id, callBack, errorCallBack);
}
function form_submit()
{
var y = document.getElementById("products_list").selectedIndex;
var products_id = document.getElementById("products_list")[y].value;
location.href = products_id;
}
</script>
<div id="vendor_select" method="get">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<select name="vendor_list" id="vendor_list" onchange="showProducts()">
<option value ="" selected="selected">Выберите производителя</option>
<option value ="582">Abbyy</option>
<option value ="573">Acronis</option>
<option value ="253">Adobe</option>
<option value ="483">ALT Linux</option>
<option value ="662">Alt-N</option>
<option value ="630">Artlantis</option>
<option value ="436">Autodesk</option>
<option value ="341">Bitrix</option>
<option value ="333">Borland (CodeGear)</option>
<option value ="649">Citrix</option>
<option value ="755">Corel</option>
<option value ="778">CREDO</option>
<option value ="550">DeviceLock (SmartLine)</option>
<option value ="470">Digital Zone</option>
<option value ="659">Dr.Web</option>
<option value ="551">Eset</option>
<option value ="635">Famatech (Radmin)</option>
<option value ="565">Graphisoft</option>
<option value ="617">Kerio (Winroute)</option>
<option value ="622">Kerio (MailServer)</option>
<option value ="765">MapInfo</option>
<option value ="490">Microsoft</option>
<option value ="700">Nero</option>
<option value ="569">Panda Software</option>
<option value ="443">ProgeSoft</option>
<option value ="639">PROMT</option>
<option value ="429">Rar Labs</option>
<option value ="470">Realite</option>
<option value ="703">Sony</option>
<option value ="654">Symantec</option>
<option value ="650">ThinPrint</option>
<option value ="441">БСС "Система Главбух"</option>
<option value ="">Группа компаний РЕЛЭКС</option>
<option value ="773">ИБИК</option>
<option value ="558">Лаборатория Касперского</option>
<option value ="742">Юмисофт</option>
</select>
</form>
</td>
<td style="padding:0 15px 0 15px;">
<span id="products_list_span">
<select name="products_list" id="products_list">
<option value ="" selected="selected">- - - -</option>
</select>
</span>
</td>
<td>
<input type="button" onclick="form_submit()" value="Найти">
</td>
</tr>
</table>
</div>