@vahan21

(index):244 Uncaught TypeError: $(...).sumbit is not a function?

Здравствуйте.
Подскажите, пожалуйста, в чём проблема?
(index):244 Uncaught TypeError: $(...).sumbit is not a function?
$("document").ready(function(event) {
		// now if the form is submitted

		$("#right-col-container").on('submit', '#message-form', function() {
			// take the data from textarea
			var message_text = $("#message_text").val();
			// send the data to sending_process.php;
			$.post("sub_file/sending_process.php?user=<?php echo $_GET['user']; ?>", {
				text: message_text,
				},
				// in return we'll get
				function (data, status) {
					alert("hello cc" + data);
					// first remove the text from
					//message_text sp
					$("#message_text").val("");

					// now add the data inside
					// the message container
					document.getElementById('message-container').innerHTML += data;

				// }
				}
			);
		});
		// if any button is click inside
		// right-col-container
		$("#right-col-container").keypress(function(e) {
			// as we will submit the form with enter button so
			if (e.keyCode == 13 && !e.shiftKey) {
				// it means enter is clicked without shift key
				// so sumbit the form
				// alert("hello");
				$("#message-form").sumbit();
			}
		});
	});

<form method="post" id="message-form">
		<textarea name="message" class="textarea" placeholder="Write your message" id="message_text" cols="30" rows="10"></textarea>
	</form>
  • Вопрос задан
  • 55 просмотров
Решения вопроса 1
sinneren
@sinneren
sumbit
ну опечаткаж, ну
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы