Answer the question
In order to leave comments, you need to log in
How to make iPhone 6 handle submitting form data on click?
There is a feedback form. js is being processed. The "submit" button works on all devices. On an iPhone, nothing happens when you press it. {cursor:pointer} is written in styles.
<form class="fofm" action="">
<input type="text" required="" placeholder="Имя" name="txtname">
<input type="tel" pattern="^((8|\+7)[\- ]?)?(\(?\d{3}\)?[\- ]?)?[\d\- ]{7,10}$" required="" placeholder="Телефон" name="txtphone">
<label><input type="checkbox">Я не робот</label>
<input type="hidden" name="valTrFal" class="valTrFal" value="valTrFal_disabled">
<input type="submit" onclick="" class="button" value="Отправить" disabled="disabled" name="btnsend">
</form>
$(".fofm").submit(function() {
var str = $(this).serialize();
$.ajax({
type: "POST",
url: "contact.php",
data: str,
success: function(msg) {
if(msg == 'ok') {
$('.popup2, .overlay').css('opacity','1');
$('.popup2, .overlay').css('visibility','visible');
$('.popup').css({'opacity':'0','visibility':'hidden'});
}
else {
$('.popup2 .window').html('<h5>Ошибка</h5><p>Сообщение не отправлено, убедитесь в правильности заполнение полей</p>');
$('.popup2, .overlay').css('opacity','1');
$('.popup2, .overlay').css('visibility','visible');
$('.popup').css({'opacity':'0','visibility':'hidden'});
}
}
});
return false;
});
Answer the question
In order to leave comments, you need to log in
Your form sends a get request, and the script receives post
Well, this is at least
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question