Jump to content

my JS form isnt working


mybluehair

Recommended Posts

 

ok, so what im doing is making sort of a php and mysql thing were theres a form, and people enter there name, email and phone # and click enter, and it goes to another php file and saves there info on my mysql DB. well, i thought it would be cool to have a javascript form on my site insteed of just a regular html one. so i got some java code, and made a form (well, i didnt make it. just downloaded something). but whenever i click submit, it dosnt go anywere like to my php page. now i dont know much about java at all, and it might acually be submitting the info to that php page, but its not clearing the form. would you take a look at my JS script and see whats wrong?

   

Ext.onReady(function(){

 

    Ext.QuickTips.init();

 

    Ext.form.Field.prototype.msgTarget = 'side';

 

var simple = new Ext.form.Form({

        labelWidth: 75, // label settings here cascade unless overridden

        url:'save-form.php'

    });

    simple.add(

        new Ext.form.TextField({

            fieldLabel: 'First Name',

            name: 'first',

            width:175,

            allowBlank:false

        }),

 

        new Ext.form.TextField({

            fieldLabel: 'Last Name',

            name: 'last',

            width:175

        }),

 

        new Ext.form.TextField({

            fieldLabel: 'Company',

            name: 'company',

            width:175

        }),

 

        new Ext.form.TextField({

            fieldLabel: 'Email',

            name: 'email',

            vtype:'email',

            width:175

        })

    );

 

    simple.addButton('Save');

    simple.addButton('Cancel');

 

    simple.render('form-ct');

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.