Grow your CSS skills. Land your dream job.

jQuery/Ajax help

  • # December 18, 2008 at 5:10 pm

    Hi all,
    I have a simple contact form and php form, when the user clicks submit it sends the information to the php and then that forwards it on to my email destination. It all works. However I want to add ajax so that instead of going to the php document it stays within the html and returns a thank you message. What is the simplest easiest way to add jquery/ajax to this form?
    Thank you

    *I say jQuery as I am using that for something else*

    Rob
    # December 18, 2008 at 6:12 pm

    Simplest thing that comes to my mind right away is have a div over the top of your form with the display:none; then in the jquery do something simple like…

    Code:
    $(document).ready(function() {
    $(“#submitButID/ClassName”).click(function() {
    $(“#dividname”).fadeIn(“slow”);
    });
    });

    I suppose if you put what you want to say in the div and position relative covering the form with maybe a link inside – all should be good… You could even style the div to have a BG image or something funkey like a stamp graphic or whatever.

    Im sure someone with more knowledge of jQuery would beable to give you a much better option though :D

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".