Showing posts with label web development. Show all posts
Showing posts with label web development. Show all posts

Wednesday, November 2, 2011

IETester: Finding the pitfalls of Internet Explorer

I just came across a wonderful tool that needs to be shared. IETester is a benevolent program that allows developers to view a webpage in all extant versions of the world's worst browser simultaneously (and without having to install several Virtual PC's on your computer). It's free, and relatively compact - 110 MB when fully installed.

By clicking on the IE options in the big red box, you can choose in which version of IE you'd like to view a webpage. The address bar is found in the little red box.


If you have to work with Internet Explorer as much as I do, I think you'll find this to be a very helpful tool.

Tuesday, September 20, 2011

iframes CAN have 100% height

I made a handy find the other day: a simple script that allows your iframe to expand to 100% of the page. This is currently impossible with CSS, but with a few lines of javascript, when you shout, "Expand!", your iframe will ask, "How high?!"
I found this script at: http://www.activewidgets.com/javascript.forum.10948.6/is-there-any-way-to.html

<script language="JavaScript">
 <!--
function resize_iframe()
{
	document.getElementById("info").innerHTML='iframe offsetTop: <b> '+document.getElementById("glu").offsetTop+"</b><br>body.offsetHeight:<b>"+document.body.offsetHeight+"</b>";//display some information on the screen
 
	var height=window.innerWidth;//Firefox
	if (document.body.clientHeight)
	{
		height=document.body.clientHeight;//IE
	}
 
	document.getElementById("glu").style.height=parseInt(height-document.getElementById("glu").offsetTop-8)+"px";//resize the iframe according to the size of the window
	//document.getElementById("glu").height=document.body.offsetHeight-document.getElementById("glu").offsetTop-26;
}
 
/*
	//Here is another way to define the function (this function reloads the page whenever the user resizes the page)
	window.onresize=
	function (e) 
	{
		location.reload();
	};
*/
 
window.onresize=resize_iframe; //instead of using this you can use: <body onresize="resize_iframe()">
//-->
</script>
I wanted my iframed page to appear to take up the entire page without displaying scrollbars of its own. The script on its own was displaying secondary scrollbars, but with a little CSS, I was able to get rid of them, leaving only one scrollbar:
<style type="text/css">
*, html, body {width: 100%; height: 100%; margin: 0; padding: 0;}
body {width: 100%; overflow: hidden;}
#glu {border: 0;}
</style>

Here is the iframe code you need:
<iframe src="YOUR_WEBPAGE_URL" frameborder="0" id="glu" onload="resize_iframe()" scrolling="auto" width="100%"></iframe>
And presto! You will have an iframe that takes up the entire window, which will resize to your browser window's size.

Demo: http://lukejohnson.ca/code/iframe-100-height.php

Friday, July 29, 2011

Anglican Liturgical Calendar PHP Script

For any Anglican webmasters out there, this is a great find! A PHP script that determines which day it is on the liturgical calendar (of the Church of England). It can be placed within any tag. The author has it set in h3 tags, which can be formatted easily with CSS however you wish.

Kudos to Don C. Warrington, https://www.vulcanhammer.org/anglican-calendar-script/

View code here: http://phpscripts4u.com/calendars/php-anglican-calendar-script/

Wednesday, June 15, 2011

Things I Learned at Prairie Dev Con 2011

I attended Prairie Development Conference this year in Regina. It definitely qualifies as a "hoot". 167 programmers, web developers, and nerds were in attendance. Here is what I learned:
  1. It's cool to use Twitter to ask questions during class sessions.
  2. The quirky, quasi-antisocial stereotype of techies actually exists. (e.g., Don't ask two guys who happen to look alike if they are brothers...)
  3. I am a "web dev".
  4. Programmers love chicken wings.
  5. HTML5 is the miracle the web has been praying for.
  6. There are other people out there like me who think that talking about code is fun.
  7. Microsoft might be a big scary monster, but it can also be helpful, and even innovative. (The folks at Microsoft are investing millions of dollars into developing HTML5. Needless to say, this "web dev" is happy.)
  8. According to David Alpert, our front-to-back approach to web planning gets an A+. (Don't start with databases; they only store data, not feelings. Always design with the end user in mind.)
  9. In the world of web development, I'm still very much a padawan. As much as I've learned, I'm still just a Marshwiggle wandering in the Wild Lands of the North.

Wednesday, March 23, 2011

Please, browse responsibly: Drop Internet Explorer!

This isn't me, but I certainly made this face today...
This is a service announcement from your local webmaster. I have been fighting browser wars today, and must take a moment to make an earnest plea.

Do you use Internet Explorer? Many people still do. Web statistics show that more than 40% of people on the internet use some version of IE. The primary reason is that Internet Explorer comes pre-installed on your Windows PC. This is how the sneaky bandit named Bill Gates tricks unsuspecting people into using poorly made, truly frustrating software.

This is my plea:
Stop using Internet Explorer and, please, download anything else! 

Nowadays, there are a plethora of better options.

Mozilla Firefox has been around for a while now, and just released Firefox 4 this past week. It's great. I love it. It's my primary browser. It offers thousands of add-ons to make your browser into a superhero of the internet.
Download it here.

Google Chrome is also a good one. It's faster than Firefox, and insanely faster than Internet Explorer... Chrome is solid and blissfully simple. The latest version, Chrome 10, is great, fast, and fun.
Download it here.

Safari is another solid choice. It's an Apple product. It's not as fast as Chrome, but like Firefox, Safari has thousands of add-ons to make your browser do whatever you want. It's reliable, clean, and speedy.
Download it here.

Opera is less well-known, but it is built on a similar engine to Chrome. It offers all the speed and user-friendliness of Chrome.
Download it here.

You might be asking by now, "Why all this fuss?" Well, it's very simple:

Modern browsers follow web standards, but Internet Explorer does not.

 The internet is very young. It's only been around since the mid-80's. In the past 20 years or so, the internet has matured very quickly. We use web standards now in the construction of websites. These standards are very important because if every browser follows the standards, then the internet stays a happy, properly structured, safe, and pretty place to play.

The reason why I'm cyber-bullying Internet Explorer is because it refuses to follow web standards (HTML5/CSS3). Try as they might, Microsoft just can't put a decent version together. Even the latest version, Internet Explorer 9, fails miserably. Sure, it picks up on a few things that earlier versions didn't, but it is still a horrible browser, and a bad waste of your harddrive space (and sanity).

The only way that Microsoft will change its evil ways is if upstanding citizens, such as yourself, choose to throw off the IE chains that bind you, and embrace a much better way to view the web. (And you'll be making my job easier.)

Please, browse responsibly.

Thursday, January 27, 2011

School of Webcraft


Mozilla and Person 2 Person University have partnered to establish the School of Webcraft, a wonderful environment in which leaders in the web development world are invited to host classes for anyone who wants to learn. There is a fairly broad selection of classes, which will only continue to grow as this project matures, and it's all free!

The sign-up date for some classes has passed, but there are still plenty of classes accepting new students. I'm enrolled in "Introduction to PHP," which delves into the (introductory) depths of database-driven websites using open-source coding.

If you have any level of interest in internet things, you should check it out! You might find something you like and learn something cool.

Info from Mozilla: http://www.drumbeat.org/p2pu-webcraft
Registration site: http://p2pu.org/webcraft/

Monday, November 15, 2010

Saturday, July 10, 2010

Programming Code and Gospel Motif

An odd combination for sure. I guess that because these are my two worlds right now --- tracing Markan motifs that climax in Jesus' death, and immersing myself in the various coding languages of the internet --- I've begun to see parallels between how the two of these things operate. Both seem to ebb and flow like well-written classical music. Just yesterday I was listening to CBC Radio 2, whose host was playing John William's score from "Return of the Jedi". I found the flow of the music so interesting. Elements of the highly recognizable themes of Darth Vader and Luke Skywalker are introduced and pulled back, repeated, reinforced, interwoven, and finally brought to a climax that makes goosebumps suddenly form. There is foreshadowing and echoing and finally full-blown revelation.

I have found that Gospel motifs work like this too, as the author introduces a theme, develops it slowly, and in the case of motifs leading to Jesus' death, brings them to such a head that they can hardly be ignored. Maybe an analogy to Visual Basic programming is a bit of a stretch (and I don't know if I understand it well enough yet to give a very helpful explanation), but here too, the first module contains a sub-routine that points forward to the next module containing the actual commands referenced in the first module. The second module's sub-routine might include a reference which propels the program to the third module, and so on. With each move forward, the program always returns to the beginning to find its instruction, forming a continuous cycle of forward and backward movement until the program fulfills its mission and the program ends.

If nothing else, thinking about similarities between code syntax and narrative development helps to keep coding interesting. (And I think I'm beginning to understand how Dr. Karen H. Jobes of Wheaton College made a transition from computer science to exegesis...)