Your not actually submitting the form by ajax. What's going on:
$.ajax({ type: 'post', url: 'somurl.php'}); Is submitting an empty post. jQuery doesn't autodetect that you're submitting a form without a plugin, afaik. Why does it look like it's working? Because, when the user submits the form, you're sending off an ajax request, then you're submitting the form. At the end of your function for capturing the submit, add return false, and it should no longer appear to work in FF or IE. $(document).ready(function(){ > $('form#richiestapreventivo').bind("submit", function() { > $.ajax({ > type: "POST", > url: "bin/sendmail2.php" > }); return false; > }); > }); On Apr 27, 1:42 pm, "alex.zeta" <alex.z...@inwind.it> wrote: > Hello to the ng; > > i have a form that should be submitted via ajax; it works of ff and ie, but > doesn't in safari 3.2.1. > I've simplified every page to isolate the problem: > > The html: > <form name="form" id="richiestapreventivo" action="" method="POST" > enctype="multipart/form-data"> > <fieldset> > <legend>Richiesta preventivo</legend> > <ol id="datiazienda"> > <li> > <label>ragione sociale</label> > <input name="ragionesociale" > id="ragionesociale" size="20" > class="required" value="<?php if (isset($_SESSION['ragionesociale'])) echo > $_SESSION['ragionesociale']; ?>"/> > </li> > > </ol> > > <button type="submit" class="button" id="invia">invia > richiesta</button> > </fieldset> > </form> > > The js: > <script type="text/javascript" charset="utf-8"> > $(document).ready(function(){ > $('form#richiestapreventivo').bind("submit", function() { > $.ajax({ > type: "POST", > url: "bin/sendmail2.php" > }); > }); > }); > </script> > > sendmail2.php: > <?php > error_log("ok"); > ?> > > After some days of searching and debugging, I cannot get it out.. > Could you help me? > > Alex - italy > > -- > View this message in > context:http://www.nabble.com/Safari-3.2.1-and-%24.ajax-POST-doesn%27t-work-t... > Sent from the jQuery General Discussion mailing list archive at Nabble.com.