Results 1 to 1 of 1

Thread: Ajaxed tabs and emailing forms

  1. #1
    Join Date
    Apr 2010
    Posts
    34

    Question Ajaxed tabs and emailing forms

    I'm using jQuery Tools ajaxed tabs and trying to get form submitting to work inside a page fetched with ajax. I figured I would try the .live-functionality in jQuery, but no effect. .live working with form submits across all browsers is a pretty new thing, final bugs fixed in jQuery 1.4.3.

    Here's my code that just doesn't do anything:
    Code:
    <script type="text/javascript">
    jQuery(function( $ ){
    $( "form" ).live(
    "submit",
    function( event ){  
    
    var datas = {
      env_report: 'REMOTE_HOST,HTTP_USER_AGENT'
      recipient: 'mymail@somehost.com',
      name: Name
    };
    
    $.ajax({  
     type: "POST",  
     url: "cgi-bin/FormMail.pl",  
     data: datas  
     
    });
    return false;
    });
    });
    </script>
    Don't worry about the perl script, I know it's not secure and will switch to something better..

    Edit: Problem sorted.. a pop up image I had assigned to the submit button was messing things up.
    Last edited by Beluga; 02 Nov 2010 at 09:33 AM. Reason: SOLVED

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •