PDA

View Full Version : making the form work



mybluehair
11 Nov 2007, 11:34 AM
i am making a chat room using only php and mysql, and i decied to add this to it. i want to take the example form, and change it around insteed of just using a simple html form. but i need to make it work and cant figure it out. i changed the JS file around to were there is one text feild and people will enter text into it, and when they click submit it should go to a different page i tell it to. there, php and mysql will take over. but i dont know how to make it work. here is the form i am using. please help!


Ext.onReady(function(){

Ext.QuickTips.init();

// turn on validation errors beside the field globally
Ext.form.Field.prototype.msgTarget = 'side';

/*
* ================ Simple form =======================
*/
var simple = new Ext.form.Form({
labelWidth: 75, // label settings here cascade unless overridden
url:'submit.php'
});
simple.add(
new Ext.form.TextField({
fieldLabel: 'message',
name: 'first',
width:175,
allowBlank:false
}),

);

simple.addButton('Save');
simple.addButton('Cancel');

simple.render('form-ct');