<?$arSelect = Array("ID","PROPERTY_TIME");$arFilter = Array("IBLOCK_ID"=>34);$res = CIBlockElement::GetList(Array(), $arFilter, false, Array("nPageSize"=>550), $arSelect);while($ob = $res->GetNextElement()){ $arFields = $ob->GetFields();
echo ($arFields[PROPERTY_TIME_VALUE]).", ";
}?>
<table id="example">
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
</table>
<script>
document.getElementById("example").onclick = function (event) {
event = event || window.event;
var target = event.target || event.srcElement;
if (target.tagName == "TD") {
alert(target.innerHTML);
}
};
</script>
<table id="example" class="tftable" border="1">
<tr><th>Время</th><th>Понедельник</th><th>Вторник</th><th>Среда</th><th>Четверг</th><th>Пятница</th><th>Суббота</th><th>Воскресенье</th></tr>
<tr><td>10:00 - 11:00</td>
<?php foreach($arResult as $key => $person): ?>
<td>
<?
if ($person['Q10'] == 'N') {echo '<span style="color:green">'."СВОБОДНО".'</span>';}
else { echo '<span style="color:red">'."ЗАНЯТО".'</span>';}?>
</td>
<?php endforeach ?></tr>
<tr><td>11:00 - 12:00</td>
<?php foreach($arResult as $key => $person): ?>
<td>
<?
if ($person['Q11'] == 'N') {echo '<span style="color:green">'."СВОБОДНО".'</span>';}
else { echo '<span style="color:red">'."ЗАНЯТО".'</span>';}?>
</td>
<?php endforeach ?></tr>
<tr><td>12:00 - 13:00</td>
<?php foreach($arResult as $key => $person): ?>
<td>
<?
if ($person['Q12'] == 'N') {echo '<span style="color:green">'."СВОБОДНО
".'</a></span>';}
else { echo '<span style="color:red">'."ЗАНЯТО".'</span>';}?>
</td>
<?php endforeach ?></tr>
<tr><td>13:00 - 14:00</td>
<?php foreach($arResult as $key => $person): ?>
<td>
<?
if ($person['Q13'] == 'N') {echo '<span style="color:green">'."СВОБОДНО".'</span>';}
else { echo '<span style="color:red">'."ЗАНЯТО".'</span>';}?>
</td>
<?php endforeach ?></tr>
<tr><td>14:00 - 15:00</td>
<?php foreach($arResult as $key => $person): ?>
<td>
<?
if ($person['Q14'] == 'N') {echo '<span style="color:green">'."СВОБОДНО".'</span>';}
else { echo '<span style="color:red">'."ЗАНЯТО".'</span>';}?>
</td>
<?php endforeach ?></tr>
<tr><td>15:00 - 16:00</td>
<?php foreach($arResult as $key => $person): ?>
<td>
<?
if ($person['Q15'] == 'N') {echo '<span style="color:green">'."СВОБОДНО".'</span>';}
else { echo '<span style="color:red">'."ЗАНЯТО".'</span>';}?>
</td>
<?php endforeach ?></tr>
<tr><td>16:00 - 17:00</td>
<?php foreach($arResult as $key => $person): ?>
<td>
<?
if ($person['Q16'] == 'N') {echo '<span style="color:green">'."СВОБОДНО".'</span>';}
else { echo '<span style="color:red">'."ЗАНЯТО".'</span>';}?>
</td>
<?php endforeach ?></tr>
<tr><td>17:00 - 18:00</td>
<?php foreach($arResult as $key => $person): ?>
<td>
<?
if ($person['Q17'] == 'N') {echo '<span style="color:green">'."СВОБОДНО".'</span>';}
else { echo '<span style="color:red">'."ЗАНЯТО".'</span>';}?>
</td>
<?php endforeach ?></tr>
<tr><td>18:00 - 19:00</td>
<?php foreach($arResult as $key => $person): ?>
<td>
<?
if ($person['Q18'] == 'N') {echo '<span style="color:green">'."СВОБОДНО".'</span>';}
else { echo '<span style="color:red">'."ЗАНЯТО".'</span>';}?>
</td>
<?php endforeach ?></tr>
<tr><td>19:00 - 20:00</td>
<?php foreach($arResult as $key => $person): ?>
<td>
<?
if ($person['Q19'] == 'N') {echo '<span style="color:green">'."СВОБОДНО".'</span>';}
else { echo '<span style="color:red">'."ЗАНЯТО".'</span>';}?>
</td>
<?php endforeach ?></tr>
</table>
$('input[name="vca"]').click(function(){
$('input[name="name"]').val($(this).val());
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<label><input type="radio" value="Ja" name="vca">Ja</label>
<label><input type="radio" value="Nee" name="vca" $vcanee>Nee</label>
<label><input type="radio" value="Vol" name="vca" $vcavol>Vol</label>
<input type="text" name="name">
<input type="text" name="name2">
<nav.menu-left>
<ul class="topmenu">
<li><a href="">О НАС</a></li>
<li><a href="">ДОСТАВКА</a></li>
<li><a href="">ОПЛАТА</a></li>
<li><a href="" class="submenu-link">СЕРВИСЫ</a>
<ul class="submenu">
<li><a href="">ПОМОЩЬ ПО ЗАКАЗУ</a></li>
<li><a href="">СПРОСИ У ЭКСПЕРТА</a></li>
</ul>
</li>
<li><a href="">САЛОНЫ ОПТИКИ</a></li>
</ul>
</nav>
если чекаем, то ниже вывести произвольный див, а другой скрыть.
важно, при нажатии на другое любое радио divки должны обратно отреагировать.