php - Box slider after 1 min -
working when click "send" email come forward box read "thanks information." , after box slideup again after 1min.
when click on "send" , down slider not in manner whatsoever.
<div class="kontakt_box"> <h3>kontakt mads Ørnfeldt andersen</h3> <p>kom kontakt med mads Ørnfeldt andersen</p> <form action="#" method="post" name="kontakt_box"> <label>navn<br /><input type="text" name="navn" required title="angive et navn" class="new" placeholder="navn"></label><br /> <label>efternavn<br /><input type="text" required title="angive et efternavn" name="efternavn" class="new" placeholder="efternavn"></label><br /> <label>email<br /><input type="email" required title="angive en email!" name="email" class="new" placeholder="email"></label><br /> <label>tekst<br /><textarea name="tekst" cols="35" rows="10" class="new" placeholder="tekst til email"></textarea></label><br /> <label><input type="submit" name="send" value="send" class="new send_email"></label> </form> <?php if(isset($_post["send"])) { $email_afsender = $mebe->email_afsender(); } if($_session["email_sendt"] == true) { echo "<div class=\"tak_email\">tak</div>"; } ?> </div> <script> $('.send_email').click(function() { $('.tak_email').slideup('slow', function() { // animation complete. }); }); </script>
here im function:
function email_afsender() { $_session["email_sendt"] = true; $fra = $_post["navn"] . " " . $_post["efternavn"] . "<" . $_post["email"] . ">"; $til = "jp@absb.dk"; $emne = "kontakt blabla.dk - " . $_post["navn"] . " " . $_post["efternavn"]; $besked = $_post["tekst"]; //headers $headers = "mime-version: 1.0\r\n"; $headers .= "content-type: text/html; charset=utf-8\r\n"; $headers .= "from: " . $fra . "\r\n"; mail($til, $emne, $besked, $headers); $targetpage = "/kontakt/"; header('location: ' . $targetpage); }
your code not valid. did not specify action file in form , going submit it??
Comments
Post a Comment