Apr 11

Extjs Cascading (Dependent) Combo Boxes

This tutorial was written after one of my readers requested help with creating a dependent dropdown menu for continents, countries and states. I hope this helps everyone out there, who like myself, have struggled with this in the past.

First you’ll need to create the connect.php file, explained here.

Next create the 3 mysql/php/json files used for:
1. gathering data from mysql,
2. storing the data into a json array for each of the combo boxes you’ll be using (Continent, Country and State).

(Please adjust the paths to connect.php (mentioned above) and all other files used in this example
accordingly and create the required tables in mysql as needed)

Start by creating the continentQ.php file, to gather the continent data:
Continue reading

Aug 21

Array as ExtJS baseParams

In this tutorial I’ll walk you through using the results of an array as an ExtJS baseParams, with the help of php implode and php explode. ExtJS baseParams are parameters that can be passed with all requests, parameters are encoded as standard HTTP parameter using Ext.urlEncode. A typical basepaParams usage may look like e.g. baseParams: {id: ’123′, foo: ‘bar’}, however, we’ll be using the results of an array as our baseParams instead of a single value. Continue reading

Jul 29

Submit ExtJS Incoming Put Data into MySQL With PHP

Recently I built another ExtJS form panel containing a few form fields and an editable datagrid, and I wanted to implement the search box I used on a previous application. In theory this would’ve been a pretty simple task, taking into account I’ve already built both a search capable grid and an editable grid (I’ll be posting a tutorial on this in the near future), however, it wasn’t so easy, but I got it done and I’ll show you how. Continue reading

Apr 25

How to Populate ExtJs MySql Datastore

In this tutorial I’ll show you how to gather data obtained from a database (MySQL) and convert to JSON and storing it in your datasore for later use by your datagrid. There aren’t many steps involved, first you just need to connect to your mysql database as in this tutorial. Once you have created the connection and gathered the data you wish to display, you just need to add this to your grid.js (or whatever you wish to call the file). Continue reading

Apr 23

Connecting ExtJS MySql PHP

In this ExtJs tutorial I’ll show you how to connect ExtJs to MySql using php. Most ExtJs examples you’ll find on their site usually pertain to static datastores, which in my opinion it isn’t where this framework is best used. I’m planing on this being the first of a series of tutorials that will help you put together a buffered datagrid (your data will load super fast, since it will be loaded on demand — more on this to come) where you’ll be able to search/filter, edit, group and display detailed information you’ll be obtaining from your MySql database (you can see the my previous tutorials here and here). Continue reading