Yes, I know what that code is *supposed* to do. But did you view-source on the generated HTML to see if it worked correctly? See resetstudio's post above.
On Oct 31, 2007 8:47 AM, freebox <[EMAIL PROTECTED]> wrote: > > Thanks for your awnser Mike! > > <?php $_SERVER["PHP_SELF"] ?> is the self php script. > My script login is loginform.php > > I can replace this <?php $_SERVER["PHP_SELF"] ?> for loginform.php > > <form method="POST" action="loginform.php"> > > > You understand? This will post to the self script. > > > Thanks > > On 31 out, 08:20, "Mike Alsup" <[EMAIL PROTECTED]> wrote: > > What is <?php $_SERVER["PHP_SELF"] ?> resolving to? Did you do a view > > source to see? Is it blank? > > > > > On Oct 31, 2007 6:31 AM, freebox <[EMAIL PROTECTED]> wrote: > > > > > > > > > Hello to all! > > > > > I'm new here, and I have an question =) > > > > > I cant bind an form when i'm posting to self? > > > > > I can't get the alert("Thank you for your comment!"); > > > > > Look This very, very simple script: > > > > >http://pastemonkey.org/paste/7 > > > > > Or Here directly: > > > > > <?php > > > require("include/conexao.php"); > > > > > /* Testa se o form foi enviado */ > > > if(isset($_POST['submit'])){ > > > > > } else { > > > ?> > > > <html> > > > <head> > > > <!--PARTE DO AJAX --> > > > <script type="text/javascript" > > > src="script/jquery.js"></script> > > > <script type="text/javascript" src="script/jquery.form.js"></ > > > script> > > > > > <script type="text/javascript"> > > > $(document).ready(function() { > > > $('#loginform').ajaxForm(function() { > > > alert("Thank you for your comment!"); > > > }); > > > }); > > > > > </script> > > > </head> > > > <body> > > > <form method="POST" action="<?php $_SERVER["PHP_SELF"] ?>" > > > name="loginform" id="loginform" /> > > > Usuário<br /> > > > <input type="text" /><br /> > > > Senha<br /> > > > <input type="password" /><br /> > > > <input type="submit" value="enviar" name="submit" > > > /> > > > </form> > > > </body> > > > </html> > > > > > <?php } ?> > >