Wednesday, April 29, 2015

Onload Event (JavaScript)

I am a computer programmer/coder by trade who just happens to enjoy traveling. I often tweet or post neat factoids about locations or places that I visit. Last week, someone asked if I could start posting random helpful tips for people who may be new to or just curious about coding. Whether it be asp, vb.net, php, or html, I will start randomly tweeting "a tip" and writing a small blog snipit to accompany it. I welcome any and all questions. If I don't know the answer, I will help you find the answer. To help identify my helpful coding tips, I will attach the following image to the right.

So that being said...Lets get to it.



Tip 1: Onload Event (JavaScript)


JavaScript is an object-oriented computer programming language that is commonly used to create interactive page elements and effects such as navigation buttons or drop-down menus and is supported by all web browsers. When a web page is being loaded, the page coding is generally processed from top to bottom. Whether php, html, or css, as the browser comes upon a section of code it is executed and the intended action is preformed. The onload event occurs when the object has been loaded. The onload is most often used within the element and is executed once the entire webpage and all the content including images, css, scripts, or what have you has been copleted loaded.

Below are a few ways to call an onload event.

This is how to call the onload in the <body>.

****Start Example Code****
<!DOCTYPE html>
<html>
<title>Tip 1: onload Event (JavaScript) demo 1</title>
<script>
//this is the function to be ran onload
function FirstFunction() {
alert("This will be ran first.");
}
</script>
<body onload="FirstFunction()">
<p>Tip 1: onload Event (JavaScript) demo 1</p>
</body>
</html>
****End  Example Code****

This is how to call just with script outside of the <body>.

****Start Example Code****
<!DOCTYPE html>
<html>
<title>Tip 1: onload Event (JavaScript) demo 2</title>
<script>
//this is the function to be ran onload
function FirstFunction() {
  alert("This will be ran first.");
}
window.onload=FirstFunction;
</script>
<body>
<p>Tip 1: onload Event (JavaScript) demo 2</p>
</body>
</html>
****Start Example Code****

If you like this post and want to see more, follow me on my website www.chadcompton.com
Or if you prefer...

Wednesday, April 15, 2015

Cold Day At The Head

This was an assignment in my college classes back in 1995 to write about an experience. This didn't take me too long to write, to be honest, I use to keep a journal of day to day experiences because my memory wasn't all that good and it seemed that Doogie Howser new what was up with the whole blogging thing. 
Please note, this specific excerpt was written before I even came out of the "Closet" so to speak. Also keep in mind that I had hair down past my waist and may have possible looked quite feminine.  (If requested, I might dig up a picture or two of me from back in the day and post to here as well.) 
Please don't judge me or take offense to this. -Thanks Mngt

Cold Day At The Head

Snow on MSU campus not my picture.  Thanks MSU Twitter
The other day a strange yet miraculous thing happened to me (or at least I think) on the way back from classes. You know how tired you are after going to classes from 8:00 a.m. to 5:30 p.m. and when you get out you don't know if you are coming or going, dead or alive, a zombie or dreaming.
Anyway back to the point of my whole story. I was languidly staggering up the dreaded mile sidewalk from Lappin to Wilson about 5:40 p.m. on the coldest day known to man. The wind was beating me in the face so hard I thought my body parts were going to be ripped off by the expansion of frost on my rings and stuff. Picture it, me trudging through sleet and leaves with my long hair nap'n in the wind wishing to see someone I know cruise "the circle"; so I could bum a ride, but no. Not today. I am never that fortunate except on pretty, sunny days.
Anyhow...I was walking, freezing my ass off, and minding my own business when it happened. I felt the most Earth moving sensation (no, I was not high or did I just orgasm). The Earth was literally moving; shaking even. And the Harder the ground shook the warmer the air got. I didn't know what the Hell was going on. I thought it was the end of this forsaken world or something to that effect, but it wasn't. This was even better than that.
Beaver Shot scene from Basic Instinct
I focused my gaze on where I was going instead of the ground about my feet and I saw it. The greatest sight since the "Frayle Drag Party" or even the beaver scene in Basic Instinct. First, the silhouette was all that was visible and then the harder I focused the more I saw shaking and joggling. Yes, you guessed it. It was the girls cross country team in those shorts, tiny running shorts with their little, tight tank tops and they were all headed straight for me. It was schtung (the newest word for cool or ruling). I felt as if I was the only guy in the world and all of these volumptuous girls were running and panting after me. My heart began to pound, my body temperature rose a couple of notches, and I almost wanted to begin running too, but didn't because I am too damn lazy and tired at this time or I would have. Anyway I was the only one around to relish this very moment, this once in a lifetime experience this Earth moving scene. It was the shit. And as quickly as it appearted...it was gone again. My flock of chicks left me behind and didn't look back. Then I realized it was not a dream and the truth of the matter...they were all lesbians. All 200 of them were or else they would have been all over me like butter on bread.
Then as I walked heart broken to my lonely, dirty, smelly little dorm room, I saw the "Squirrel Guy" Tommy. I realized he had experienced the same thing I did because of the dumbfound look on his face. So I said, "what was that?"
He replied by saying, "the greatest thing in the world."
Then I didn't feel so bad becuase I wasn't the only loser in this lesbian filled world. I might add, I walked home proud the rest of the way; not becuase I experienced that event, but because the lizzies didn't try to pick me up thinking I was a chick.
By: Chad Compton
Written about Morehead, KY.

Thursday, April 2, 2015

Holy Week Philippines

Devotees carry heavy wooden crosses for miles.
I am starting out by saying, I am not a writer or photographer.  I am a curious traveler that likes to find out why certain things are the way they are.  I ask a lot of questions, do too many google searches, and take pics.  I do all of this to get my point across or understood.  With that in mind.  Here is my take on Holy Week here in Angeles City, Philippines. I hope you enjoy.

Holy Week here in the Philippines is like no where else on Earth and most of the towns businesses shut down for an entire week.  The Filipino-catholics' demonstration of faith is extremely intense and peculiar here in the province of Pampanga especially.  The entire week is filled with odd and bloody religious ceremonies and processions that requires seeing to believe.  A few of the highlights are the self flagellations of sinners who parade around streets while whipping and cutting 
their bodies into a bloody mess and/or carrying heavy wooden crosses for many miles.

Palm Sunday a week before Easter Sunday. Kicking off Holy Week with a Mass as this day or Domingo de Ramos starts with the traditional blessing of palms and olive branches followed by a procession to the parish church with the priest taking the role of Christ on the way to Jerusalem usually in the company of 12 men dressed and playing the roles of the 12 Apostles. Traditionally, choir members line the streets and shower the procession with flowers and confetti as they sing. 
This is normally followed by Mass. 

Also starting on Palm Sunday, a small outdoor make shift covered shrine (shrine for the rest of this article)  is erected in the street.  In the center, there is a Jesus on hanging on the cross behind a make shift alter draped in white fabric and covered in flowers.  To the right of that, there is a table that is to be manned 24/7 for a week straight by volunteers and devotees.  These devotees sing and chant and pray into a microphone night and day for a solid week non stop.  Passers by will stop and give blessing or give thanks for their devotion and continue on. Accross the street, they sell consessions and snacks for those who are wishing to participate or watch.  This little outdoor venue is where most of the flagellation processions end in prayer.
Procession of flagellants.

Holy Monday is pretty low key.  Regular people manning the shrines and following the Stations of the Cross around town.

Holy Tuesday is pretty much the same as Monday with the people following the Stations of the Cross.  Travel around town to witness the Pabasa or non-stop chanting of biblical verses in the vernacular in different shrines. Witness the procession of flagellants on the way heading to a chapel for their final journey and prayer.  

Holy Wednesday is kind of a repeat of Monday and Tuesday, but you will seeing more of the the procession of flagellants heading to the chapel for their final journey prayer.

Flagellants praying at a local shine beside the road.
Maundy Thursday or Holy Thursday, Covenant Thursday, Great & Holy Thursday, Sheer Thursday, and Thursday of Mysteries is the Christian holy day falling on the Thursday before Easter. It commemorates the Maundy and Last Supper of Jesus Christ with the Apostles as described in the Canonical gospels. This is the day to go to Mass in observance of the washing of the feet of the apostles and the Last Supper. After the ceremonies, most of the parish priest and the apostles take their own supper at the parish rectory and partake of a meal.  In Lexington, Kentucky where I am from, we would call that "Dinner on the Grounds".  
Picture from www.telegraph.co.uk

Good Friday at 7 am in Barangay San Pedro Cutud City Of San Fernando Pampanga Philippines the Passion of Christ is performed by local residents. At 12:00 noon, join thousands of people to witness actual crucifixion of a host of 10 - 20 penitents. Or an optional visit to Barangay Lourdes Northwest in Angeles City where another crucifixion takes place between 2:00 - 3:00 pm Churches all over, rites and ceremonies start shortly after noon with the Las Siete Palabras or Seven Last Words, homilies and meditation on the seven final utterances of Christ at Calvary, which end at 3:00 pm, traditionally believed as the hour of Christ's official death.

Black Saturday. Go shopping for Kapampangan delicacies, enjoy Arts & Crafts in San Fernando, Betis, San Matias and Mexico. Sabado de Gloria is highlighted by the evening Mass with the blessing of the fire and water as well as the renewal of the faithful's baptismal vows.

 Picture from www.headlinegl.com
Easter Sunday. At 8:00 am, proceed to Santo Tomas, Pampanga for a festive day of religious events, street dancing, trade fair and variety shows.  You may chose to witness the  Sabuaga Festival aka Shower of Flowers.  This features a showering of petals on the image of the Virgin Mary. Petals and confetti will literally rain on the processional route around Poblacion, starting 2 pm as revelers join groups coming from the town's seven barangays in street dancing. Or you may wish to visit almost any church to witness the most elaborate 'Salubong' at 6:00 in the morning which is a traditional religious event which portrays the meeting of Christ and His mother, Mary, after the resurrection in an elaborate drama acted out by local residents dressed as angels and different biblical characters. All of which will be concluded with fireworks at dark.

Please note, I am not a real writer or a photographer.  I am just a geek who likes to travel and see things.  These things I will try and document to the best of my ability for you to enjoy.  You don't have to take my word for it.  Come to Angeles City and see for yourself.  Here is also a link to the crucifixion on Wikipedia.org.

If you liked this article, then follow my blog or check me out on twitterinstagram, or my website www.chadcompton.com.

Here are some extra pictures I didn't want to waste.  Hope you enjoy.
Devotees carry heavy wooden crosses for miles barefoot.


Flagellants walk and beat their backs with these whips.  That is real blood.

Such a cross to bear and 93 degrees out. The street is hot to the touch.
If you like this post and want to see more, follow me on my website www.chadcompton.com
Or if you prefer...