mybluehair Posted November 13, 2007 Share Posted November 13, 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 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'); Quote Link to comment Share on other sites More sharing options...
mainewoods Posted November 15, 2007 Share Posted November 15, 2007 Ext.onReady(function(){ --looks like you are missing the terminating curly brace '}' for the code above Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.