[英]How to keep the current input after clicking submit button in Laravel filter?
[英]how to keep the display on the current slide [javascript slider] after submit button is pressed
情况:
我有一个网页使用javascript滑块[scriptiny dot com的微小滑块]。
我在最后一张幻灯片上使用jquery验证和php验证创建了联系表格。
除了以下方面,一切工作正常:
单击提交后,网页将显示第一张幻灯片。
不确定会使其粘在触点“滑动”上。
网站导航使用以下字符串完成:
onclick="slideshow.pos(0)
onclick="slideshow.pos(1)
onclick="slideshow.pos(2)
onclick="slideshow.pos(3)
onclick="slideshow.pos(4)
我需要联系人“幻灯片”停留在“ slideshow.pos(4)”上。
码:
//If there is no error, send the email
if(!isset($hasError)){
$emailTo = 'myemail@gmail.com'; //Put your own email address here
$body = "Name: $name \n\nEmail: $email \n\nSubject: $subject \n\nComments:\n $comments";
$headers = 'From: My Site <'.$emailTo.'>' . "\r\n" . 'Reply-To: ' . $email;
mail($emailTo, $subject, $body, $headers);
$emailSent = true;
}
我怎样才能做到这一点? 理想情况下,在发送电子邮件后,我将能够运行一些JavaScript,以刷新页面,将用户发送到“ slideshow.pos(4)”?
任何帮助,将不胜感激,
标记
您可以使用Ajax调用“提交”数据,并避免页面首先刷新。 如果您从未使用过Ajax,请花一些时间查看https://developer.mozilla.org/en/ajax 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.