July 12, 2008
· Filed under Work · Tagged buzy, Motivation
Author: Stephen Covey
From: 7 Habits of Highly Effective People
Once upon a time a very strong woodcutter ask for a job in a timber merchant, and he got it. The paid was really good and so were the work conditions. For that reason, the woodcutter was determined to do his best.
His boss gave him an axe and showed him the area where he was supposed to work. Read the rest of this entry »
July 12, 2008
· Filed under Friendship · Tagged flying
Author: Roger Dean Kiser, Sr
Once upon a time there was a little boy who was raised in a orphanage.
The little boy had always wished that he could fly like a bird. It was very difficult for him to understand why he could not fly. There were birds at the zoo that were much bigger than he, and they could fly.
“Why can’t I?” he thought. “Is there something wrong with me?” he wondered. Read the rest of this entry »
July 9, 2008
· Filed under php · Tagged gd, image manipulation, php, web
Introduction
Have you ever been to a website that has some sort of gallery set up which seems to take forever to load? Maybe the server is just slow, or maybe the hapless web designer just used browser tags to resize the image rather than actually sending a smaller image. This is, of course, very stupid, and I will show you how to avoid this stupidity through the power of php.
php (which Word keeps wanting to auto capitalize) is a language designed around what its developer, Rasmus Lerdorf, calls ‘the web problem’. Although it can be run as an interpreted script like other scripting languages, it is designed first and foremost around dynamically generating HTML pages. Combined with a robust set of libraries and one of the best, most comprehensive programming manuals on the web, you can do some totally sweet stuff with it. Read the rest of this entry »
July 9, 2008
· Filed under Javascript · Tagged ajax, javascript, php
Your last task is to use the OnClick() event in the Albums list to return a list of Tracks on an Album.
Remeber this is a 2 part process.
Part 1: Define a a PHP function that search for an Array of Tracks using the Album Name.
Part 2: On the client side:
A: define a JS function that invokes the agent.call function and passes it the Album Name.
B: Define an Callback function that handles the response from the server-side PHP function and then binds it to an html control.
It’s very easy to do so you should give it a shot before peaking at the source code.
July 9, 2008
· Filed under Javascript · Tagged ajax, javascript, php
This next part is some very cool stuff. What we are going to do is select an item from the SelectBox which will return a list of Albums by the selected Artist. Since the list of Albums is being held in a server-side PHP Array getting the data back requires a round-trip to the server. In any normal case this is done in a Form Post which casues a page refresh but we are going to use Ajax to fire-off the server-side request for the data and avoid refreshing the page all together. The Get Albums task is made up of 2 parts: a server-side PHP function that searchs for the Albums and a client-side Ajax function that invokes the server-side function and hadles the response.The PHP function GetAlbumByArtist works like the GetArtist PHP function but instead of a regex we’ll just use a string comparison usiug the Artist Name. Read the rest of this entry »
July 9, 2008
· Filed under Javascript · Tagged ajax, php
Start by creating a new PHP page and placing the agent.php (Ajax Agent) file in the same directory. Open your new PHP page in an editor and start hacking away.
First create the HTML Form controls we will be using:
- txtArtists = TextBox to type the ArtistName in.
- matches = A SelectBox with an onclick event which will be used to send the ArtistName to the AlbumSearch method we will be creating.
- txtArtistID = Hidden to hold the selected ArtistName (js cannot see the select box because it is hidden?)
- htmlOutput = An empty DIV when we will be creating a list of Albums
- htmlOutputTracks = An empty DIV when we will be creating a list of Tracks
Read the rest of this entry »
July 1, 2008
· Filed under Attitude
A story is told about a soldier who was finally coming home after having fought in Vietnam. He called his parents from San Francisco.
‘Mom and Dad, I’m coming home, but I’ve a favor to ask. I have a friend I’d like to bring home with me.’
‘Sure,’ they replied, ‘we’d love to meet him.’
Read the rest of this entry »
July 1, 2008
· Filed under Live
Mind your own business; don’t interfere in other people’s personal matters unless they request you… it keeps you free from extra tension.
Don’t be too curious; never try to investigate or inquire about a person’s schedule, as these inquiries usually make you and the ones questioned uncomfortable.
Read the rest of this entry »
July 1, 2008
· Filed under Work
A cab driver taught me a million dollar lesson in customer satisfaction and expectation. Motivational speakers charge thousands of dollars to impart his kind of training to corporate executives and staff. It cost me a $12 taxi ride.
Read the rest of this entry »
July 1, 2008
· Filed under Javascript, Website · Tagged combo box, javascript
This is a 2-level combo box, both expanding the capacity of the combo and allowing you to organize the links into various categories. Awesome!
Insert the below into the <body> section of your page:
Read the rest of this entry »