mybluehair Posted November 11, 2007 Share Posted November 11, 2007 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 ajax form on my site insteed of just a regular html one. so i got some ajax 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 ajax 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 https://forums.phpfreaks.com/topic/76866-my-ajax-form-isnt-working/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.