![](/img/trans.png)
[英]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.