Are you sure that your javascript is being loaded properly? You can
check that easily with Firebug or the FF WebDeveloper extension.

On Wed, Nov 25, 2009 at 7:07 PM, David <phon...@gmail.com> wrote:
> Hi,
>
> Just started using jquery and it looks really good!
> I have question regarding the jQuery form plugin.
>
> I tried to get the simplest example I could up and running but I ran
> into a wall.
> In the example when I press submit, I expect an alert box to appear
> but I only get directed to the url that
> is on the form's action. I expect to stay on the same page.
>
> any help is greatly appreciated.
> David
>
> <html>
> <head>
> <title>jQuery Form Plugin</title>
> <style type="text/css">
> form { background: #DFEFFC; border: 5px solid #c5dbec; margin: 10px 0;
> padding: 20px }
> </style>
> <script type="text/javascript" src="../jquery-latest.js"></script>
> <script type="text/javascript" src="../jquery.form.js"></script>
> <script type="text/javascript">
>         <script type="text/javascript">
>        // wait for the DOM to be loaded
>        $(document).ready(function() {
>            // bind 'myForm' and provide a simple callback function
>            $('#myForm').ajaxForm(function() {
>                alert("Thank you for your comment!");
>            });
>        });
>    </script>
> </script>
> </head>
> <body>
> <form method="post" action="http://jquery.malsup.com/form/dummy.php";
> id="myForm">
>      Name:<input type="text" value="MyName1" name="Name"/>
>      <input type="submit" value="Submit1" name="submitButton"/
>>
> </form>
> </body>
> </html>
>

Reply via email to