Добрый день!
Есть небольшой JavaScript. Событие происходит так: Жму на блок(не div), их всего 4, открывается страница с html+css+php+mysql. Когда выбираю второй блок, там страница с опросом, жму на "ДА", JavaScript возвращает на первый блок с перезагрузкой страницы, что не удобно пользоваться.
В общем так, сижу на втором блоке, там опрос, отвечают на несколько вопросов, так чтобы не возвращала на первый блок, а оставался там до тех пор, пока не нажму на третий или первый блок.
html-код:
table width="90%" height="2%" align="center">
<tr class="header_menu">
<th width="25%" scope="col" class="header_menu_a" onclick="OpenOne()"><h class="header_text">Первый</h></th>
<th width="25%" scope="col" class="header_menu_a" onclick="OpenTwo()"><h class="header_text">Второй Тестирование</h></th>
<th width="25%" scope="col" class="header_menu_a" onclick="OpenThree()"><h class="header_text">Третий</h></th>
<th width="25%" scope="col" class="header_menu_a" onclick="OpenFour()"><h class="header_text">Вход в систему БД</h><br />*ссылка доступна сотрудникам</th>
</tr>
</table>
<table width="90%" height="270" border="0" align="center">
<tr>
<th height="90%" scope="col"id="OpenOne" style="display:block;" class="ver_normal_red_lft"><? include 'body-pic/blood_city.php'?>
</th>
<th height="90%" scope="col"id="OpenTwo" style="display:none;"> <? include 'body-pic/test.php'?>
</th>
<th height="90%" scope="col"id="OpenThree" style="display:none;"> <? include 'body-pic/3a.php'?>
</th>
<th height="90%" scope="col"id="OpenFour" style="display:none;"> <? include 'body-pic/4a.php'?>
</th>
</tr>
</table>
JavaScript
function OpenFour(){
$('#OpenFour').show();
$('#OpenThree').hide();
$('#OpenOne').hide();
$('#OpenTwo').hide();
}
function OpenThree(){
$('#OpenFour').hide();
$('#OpenThree').show();
$('#OpenTwo').hide();
$('#OpenOne').hide();
}
function OpenTwo(){
$('#OpenOne').hide();
$('#OpenTwo').show();
$('#OpenThree').hide();
$('#OpenFour').hide();
}
function OpenOne(){
$('#OpenOne').show();
$('#OpenThree').hide();
$('#OpenTwo').hide();
$('#OpenFour').hide();
}
Как видно, источник - подключаемые внешние модули или страницы.