Сообщение от Alex_M45
|
всё равно не срабатывает.
|
работает всё, только document.write после клика "стирает" страницу, т.к. браузер снова парсит страницу.
document-write#только-до-конца-загрузки
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<script>
function order_selected(title, description)
{
document.write
(
"<div id = 'win'>"+
"<div class = 'overlay'/>"+
"<div class = 'visible'>"+
"<form action = 'order.php' method = 'post'>"+
"<h3>Отправка заказа</h3>"+
"<div class = 'content'>"+
"<p>Вы выбрали:</p>"+
"<p name = 'title'>title</p>"+
"<p name = 'description'>description</p>"+
"<p>Email: <input type = 'text' name = 'email' /></p>"+
"</div>"+
"<input class = 'button' type = 'button' value = 'Отмена'/>"+
"<input class = 'button' type = 'submit' value = 'Отправить'/>"+
"</form>"+
"</div>"+
"</div>"
);
}
</script>
</head>
<body>
<script type="text/javascript">
order_selected('бла бла бла', 'бла бла бла');
</script>
</body>
</html>