Help with dropdown contact form
Hello,
I wanted a dropdown contact form for my website and found this one: http://designshack.co.uk/articles/javascript/creating-a-slide-in-jquery-contact-form
Problem is, it's just the skeleton and i have to somehow make it send me the mails. I had a contact.php file that did that, but if i use it then the page refreshes and breaks the javascript when clicking Submit.
So i believe the only solution is to somehow get the mail into the javascript of which i know nothing since today is the first day i had to work with it.
I've read some examples and i think i need to use data: { key1: 'value1', key2: 'value2' }, but i don't know where to insert it.
The code where i'm guessing it should go is this:
<script type="text/javascript">
$(document).ready(function(){
$("#contactLink").click(function(){
if ($("#contactForm").is(":hidden")){
$("#contactForm").slideDown("slow");
}
else{
$("#contactForm").slideUp("slow");
}
});
});
function closeForm(){
$("#messageSent").show("slow");
setTimeout('$("#messageSent").hide();$("#contactForm").slideUp("slow")', 2000);
}
</script>
Please help, it's the only dropdown menu i found. I'm opened to other more complete forms if you know any.