Цитата:
не совсем, теперь при любом случае не переходит. а нужно, чтобы перехода не было когда сработал алерт, если писать
alert('Ошибка'); return false;
все равно переходит на страницу |
<form id="checkout_address" action="checkout_shipping.php" method="post">
<input type="radio" name="shipping" value="choicepoint_choicepoint" checked="" id="choicepoint" />
<input type="radio" name="shipping" value="choicepoint_choicepoint2">
<select name="point" id="show">
<option value="">Выберите пункт</option>
<option value="1">Москва</option>
</select>
<input type="image" onClick="a(); return false;" src="templates/vamshop/buttons/russian/button_continue.gif" alt="Продолжить" title=" Продолжить " />
</form>
<script>
function a() {
//document.getElementById("choicepoint").checked = false;
if (document.getElementById("choicepoint").checked && document.getElementById("show").value == "") { alert('asd'); }
else { document.getElementById("checkout_address").submit(); }
}
</script>
|
Супер! Работает, спасибо!
|
| Часовой пояс GMT +3, время: 16:45. |