Archive for July, 2008

h1

Parsing JSON Data from PHP Using jQuery

July 28, 2008

have been studying parsing JSON from PHP using AJAX to display it in the client side and jQuery had been a great help to me. Here is a very simple code in parsing JSON using jQuery that i made.

tablejsondata.php
This file makes the request to a php file and displays the returned data into a table.

<html>
<head>
	<title>Parsing JSON From PHP Using jQuery</title>
	<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript">
	</script>
</head>
<body>
	<a href="#" id="loaduserdata">User Data</a>
	<table id="userdata" border="1">
		<thead>
			<th>First Name</th>
			<th>Last Name</th>
			<th>Email Address</th>
			<th>City</th>
		</thead>
		<tbody></tbody>
	</table>
	<script>
	$(document).ready(function(){
	});
	$("#loaduserdata").click(function(){
		$("#userdata tbody").html("");
		$.getJSON(
			"jsondata.php",
			function(data){
				$.each(data.userdata, function(i,user){
					var tblRow =
						"<tr>"
						+"<td>"+user.first+"</td>"
						+"<td>"+user.last+"</td>"
						+"<td>"+user.email+"</td>"
						+"<td>"+user.city+"</td>"
						+"</tr>"
					$(tblRow).appendTo("#userdata tbody");
				});
			}
		);
	});
	</script>
</body>
</html>

jsondata.php

This is the file that contains the JSON data.

<?php
	$json = '{
		"userdata": [
			{
				"first":"Ciaran",
				"last":"Huber",
				"email":"elementum.purus@utdolordapibus.edu",
				"city":"Mayagüez"
			},
			{
				"first":"Lester",
				"last":"Watkins",
				"email":"orci.sem.eget@quamvelsapien.edu",
				"city":"Laguna Beach"
			},
			{
				"first":"Mannix",
				"last":"Gilmore",
				"email":"sed.sem.egestas@AliquamnislNulla.com",
				"city":"Minot"
			},
			{
				"first":"Nathaniel",
				"last":"Holland",
				"email":"a.odio@Donecnibh.org",
				"city":"San Angelo"
			},
			{
				"first":"Wylie",
				"last":"Drake",
				"email":"lobortis.nisi.nibh@Integer.edu",
				"city":"Roseville"
			},
			{
				"first":"Salvador",
				"last":"Alford",
				"email":"fringilla@adipiscing.edu",
				"city":"Vacaville"
			},
			{
				"first":"Kiara",
				"last":"Barton",
				"email":"fringilla.est.Mauris@utpellentesqueeget.ca",
				"city":"Johnson City"
			},
			{
				"first":"Moses",
				"last":"Miller",
				"email":"per.inceptos@aliquam.edu",
				"city":"Boulder Junction"
			},
			{
				"first":"Hillary",
				"last":"Serrano",
				"email":"elit.pretium.et@scelerisquesedsapien.com",
				"city":"Martinsburg"
			}
		]
	}';
	echo $json;
?>

References and Guides:
http://docs.jquery.com/GetJSON
http://www.json.org/js.html

Download the latest jquery file.

h1

A Sneak Peak On My New Blogger Skin

July 23, 2008

I have been planning to skin my blogs for a very long time already. There are a bunch of stuffs to do that is why I can’t manage to have a time.

I want a simple and manageable template so that my blog won’t have a chaotic look.

Here is a peek on my blogger template:

There are a lot of tweakings to do but at least I have started the design and layout already. Hopefully at the end of the week I will be able to customize my blogger site.

The next task would be to study how the blogger template works.

Blogger: Inquisitive Mind

h1

[EVENT] Globe Innovation Convention: Globe Labs Launch – August 7, 2008

July 23, 2008

Globe Innovation Convention: Globe Labs Launch – “Enriching lives through Innovative Communications”

Date: August 7, 2008 (Thursday)
Time: 7:30 AM – 5:00 PM
Venue: Isla Ballroom, Tower Wing, EDSA Shangrila

Globe Labs is a new organization within Globe Telecom whose mission is to help bring in the newest future technology services at the earliest market-relevant time. We explore new and future technologies, and partner with developers to create new internet, wired and wireless applications.

What we have in store for you: Learn, Build, Compete and Succeed

  • Discover the different opportunities with Globe Labs
  • Learn how to use Telco tools and various development platforms to build innovative applications
  • Join the Globe Labs Challenge and compete amongst the best

PHP User Group Philippines, Inc., being one of the institution partners of Globe Labs, is given 200 SLOTS for this upcoming big event and we are inviting you, PHPUGPH members, to attend. T-SHIRTS designed for PHPUGPH would be given away as freebies plus exciting raffle prizes awaits you… ***FIRST 300 individual registrants gets a GIFT*** Wink

Below are some links of articles regarding the event:

From Businessworld (Entreprenews)
http://entreprenews.com.p…in.php?id=062508.gonzalez

From the Inquirer:
http://technology.inquire…gets-3G-mobile-developers

From the Manila Times:
http://www.manilatimes.ne…htimes/20080627tech5.html

From Manila Bulletin:
http://www.mb.com.ph/INFO20080627128372.html

From PCWorld:
http://www.pcworld.com.ph…5&ID=H,485,PWP,PWP-16

From Yugatech:
http://www.yugatech.com/b…pens-globe-labs-division/

From Globe Labs website:
http://www.globelabs.com…./News/Forms/AllItems.aspx

Read more information

h1

Yippee… It’s My Birthday!

July 19, 2008

Happy birthday to me… Happy Birthday, Happy Birthday… Happy Birthday to me!

Oh my, another year is added to my age. :)

h1

I Wear Black

July 18, 2008

“I Wear Black”

I wear black
‘Cause I weep for tomorrow
The day I first breathe
The day of my first morn

I wear black
‘Cause my heart is full of sorrow
Of pain, of fury
For the world abandoned me

I wear black
‘Cause I’m dejected
‘Cause I’m alone
Left by everyone

I wear black
‘Cause I’m misunderstood
For no one dares
To lend an ear

I wear black
‘Cause I’m happy
To see the last drop of sand
In the hourglass

I wear black
‘Cause I rejoice
The very last moment
Of the day I was born

Written: July 18, 2002

This was a poem I wrote exactly four years ago. Can’t believe it has been that long. :)