iframes war

This commit is contained in:
lopar 2018-03-24 01:02:31 +02:00
parent 3d7296c3a3
commit 6abc902766

View File

@ -30,16 +30,6 @@ if (!isset($_SESSION['uid'])) header("Location: index.php");
text-align: center;
}
footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
background-color: red;
color: white;
text-align: center;
}
form {
padding: 3px;
width: 100%;
@ -72,6 +62,7 @@ if (!isset($_SESSION['uid'])) header("Location: index.php");
height: 100%;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<body>
@ -88,12 +79,15 @@ if (!isset($_SESSION['uid'])) header("Location: index.php");
<div class="mainwrap">
<iframe name="main" src="main.php"></iframe>
</div>
<iframe name="chat" src="chat.php"></iframe>
<div id="chat"></div>
<footer>
<form action="chat.php" method="post" target="chat">
<input id="msg" name="msg" size="100" placeholder="Введите сообщение...">
<input type="submit" value="Отправить">
</form>
</footer>
<script>
$( "#chat" ).load( "chat.php" );
</script>
</body>
</html>