Hello,

I'm pretty new in javascript en jquery.

i'm trying to upgrade a website.
for this site i need to load/build a foto gallery after a onclick event.

but i don't know how to do this.

i know how to read data from a mysql databast within PHP, i think i could create a array of this data.
but i don't know how to get this data(array) from the php file in my main page.

how could i run the php code after an onclick event, and how do i parse the data from the array to a data source (json)

below is a snapshot of the data source
Code:
	var source = {
		datatype: "json",
		url: 'data_load_gallery',
		datafields: [
			{ name: 'thumb' },
			{ name: 'image' },
			{ name: 'big' },
			{ name: 'title' },
			{ name: 'description' },
			{ name: 'link' }
	],
	id: 'thumb',
	async: false
	};
and the on click event.

Code:
             $("#jqxButton").bind('click', function () {
                   some code that run's a php file and get the data array into the above data source.
								
								});
i hope someone could help me with this, or point me to an example.