JavaScripts getElementsByName – IE Vs Firefox

A little coding story. I spent quite some time to figure out what’s wrong with my code. Consider the following code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<html>
	<head>
	<script type="text/javascript">
	function getElements()
	{
		var x=document.getElementsByName("myInput");
		alert("First Element value is: " + x[0].value);
	}
	</script>
	</head>
 
	<body>
		<div id="myInput"></div>
		<input name="myInput" type="text" size="20" value="1" /><br />
		<input name="myInput" type="text" size="20" value="2" /><br />
		<input name="myInput" type="text" size="20" value="3" /><br />
 
		<input type="button" onclick="getElements()" value="How many elements named 'myInput'?" />
	</body>
</html>


Firefox will correctly alert you with “First Element value is: 1
IE in the other hand will alert you with “First Element value is: undefined

Why is that so? Because there exists a div with the same id myInput. In this case the JavaScript clearly uses getElementsByName. Can’t IE differentiate between Id and name?

FeedBurner Feed Replacement

If any one of you just updated to the newer version of WordPress, make sure that you also update to the latest version of the plugin.

A fellow blogger encountered this error on WordPress 2.1.x yesterday, as he still had the version 2.1 of the plugin.

This is caused by the removal of generate_page_rewrite_rules function in WordPress 2.1

I checked the 2.1 version of the plugin and indeed it is calling to the function at line 43. Version 2.2 of the plugin had this removed.

Time and Space Continuum

I watched a few episodes of Heroes last night until episode 10. I was thinking that when Hiro went back to the past to save Charlie (after she has been murdered by Sylar), didn’t he risk causing a rift in the time and space continuum?

Just think of it this way, when Hiro and Ando first arrived at the diner in Odessa that was the first time Charlie ever met them. And Charlie mentioned that someone got her a Learning Japanese book as a gift. Why didn’t she recognize Hiro at that time, the person who gave her the book? Shouldn’t she at least be happy to see Hiro again?

Well, it’s just for entertainment anyway but time travel has always interest me and I always think of the continuum when watching something related to time travel 😉

I am a freak.

Damn Crackers!

To anyone who have downloaded and used WordPress 2.1.1, you must immediately download 2.1.2. Now!

An evil cracker managed to get into one of WordPress’ server and edited some file, resulting in the ability to remotely execute PHP codes. This is a very serious issue.

News at WordPress.org

Even the F-Secure Weblog posted on this information here.

Success Does Not Come Easy

Following my previous post about the $700K+ check, I looked up some information on the site. From the site’s copyright notice at the bottom the site have been running since 2001. However check this out, traffic graph from Alexa:

alexa-plentyoffish.jpg

Permalink here.

As you can see, it’s not a while for the site to gain traffic and visitor’s trust. Time is a critical factor indeed, for a site to become successful. And never give up 😉

$700,000 AdSense Check

It’s official. This morning at home I switched on my machine, browsed on LiewCF, saw some posts, followed a link, and fell off my chair.

I am talking about this post.

The check’s total value is $901,733.84 (Canadian Dollars). That’s the check for 2 months. This guy would be a millionaire already if he is in Malaysia. Just think of that… more than RM1 million monthly! It’s not really weird since his site has been up since 2001.

This is really a good spirit lifter, especially since my own AdSense earning is waaaaaaaaaaaaaaaaaay lower than that.

Go to cheques-gallery.blogspot.com to see more checks.

I will send mine in when the value will not embarrass me 😉

Get Well Soon

I’ve received a bad news a couple of weeks ago, that one of my good friend from college has been diagnosed with Leukemia. I was shocked and wished it was not true, as it was unconfirmed.

Today I had the opportunity to contact his wife who is working in the same company as me, and asked a bit about him. I don’t want to pester her too much as I know it must be a very miserable period for her. She has confirmed that he is indeed diagnosed and confirmed to have Leukemia.

I asked her whether we can visit to give him our support for him to go through but he’s still too weak and prone to infections. He must be going through hell now, with chemotherapy and stuff. Poor guy. I sent my regards via her and asked her to let me know when we can visit.

I really wish that he will get better very soon. This guy have a little girl, and a family to support. God willing.

Time Runs Fast

Well it felt like yesterday since 2007 came and said hello to us. And now it’s already the end of February? Wow. One of my favorite thing about February is that anyone who was born on the 29th of February actually grow older slower, only one fourth of the normal person 😉

Have any one of you actually reached your goals or resolution for 2007 yet? Well some might have done so well, like some bloggers I see in the Internet are actually already claiming themselves to be ProBlogger. Well there’s nothing wrong with that, good for them! It’s not like there exist any kind of authority to award the title. No, being a ProBlogger is not my target, although one of the reasons I blog is to improve my writing skills. I dream of writing a book someday, maybe.

Alright, so I wish everyone a happy March, a happy April, and be happy all year round!

Yahoo! POP3 and SMTP Via SSL


It has almost been 5 years since I have subscribed to Yahoo! Mail Plus and I am really satisfied with the service. With POP3 and SMTP access, I couldn’t be happier. Furthermore the ability to add disposable email addresses to combat SPAM from not-so-trusted sites is really useful.

Yesterday I tried to send an email to a friend via SMTP and the connection failed. Well, I thought it was a glitch somewhere and didn’t really care so I saved the message as draft. However, checking email via POP3 still works fine.

When I tried again today, I still can’t connect. The first thing I checked is the POP & SMTP help in Yahoo! Mail. Indeed, Yahoo! now have SSL support for both POP3 and SMTP (port 995 and 465 respectively). Cool. I didn’t realize when Yahoo! had this available but this is a good news. Nobody can sniff my email communications on the line anymore.

Yahoo! Mail Plus POP and SMTP

I changed my Thunderbird settings to use SSL for sending and receiving, and all is working fine now.

I also realized that Yahoo! never disabled the non-SSL SMTP port 25. I wonder why Thunderbird failed to connect earlier. Oh well, maybe that’s just a sign to let me know that SSL is available 🙂

For the non-technical readers, SSL enables encryption for the communication between your machine and the server. Yes, the similar technology as HTTPS for browsers.

A Global Community: Own The Internet

AGLOCO – simply a weird abbreviation that I am curious to check it out.

What is AGLOCO?

Simply put, AGLOCO is an Internet marketing tool for us to use in order to earn money. Advertisers, search companies, online merchants, businesses, etc. will pay for traffic and attention.

AGLOCO will work in the same way as Spedia did, using a toolbar while you browse the Internet. This bar is called Viewbar. However the concept is a little bit different where you’ll get actual shares of AGLOCO and also of course, referral commission. As I remembered back then my wife did get paid by Spedia, I think this program is also worth it and it costs nothing. You’ll be browsing the Internet anyway, wouldn’t you?

AGLOCO pays members for two things: sharing a part of the desktop space (the Viewbar), and increasing the network. It’s pretty logic, as I can see. I am not really interested in all the numbers for now.

OK then you would ask what’s the rationale behind it? Well, the toolbar of course will keep track of what you browse and gather the data for marketing purposes. It’s all about data mining. It’s the same concept as those bonus cards you use to gather points (i.e. BonusLink and RealRewards in Malaysia). They all have links to a central database and gather data. So now you have it, it’s not for nothing. You are willing to share something precious to the data miners and they will pay you back.

Leaving the network or uninstalling the bar is always an option if I think it’s not worth to have the bar floating around and not so much earnings later. The bottom line is earning a couple of bucks more per month wouldn’t hurt, would it?

The Viewbar, however is scheduled to be released in March and currently in limited Beta mode. Give it a try, sign up now (ref).

WordPress 2.1.1 and 2.0.9

Hey, did anyone realize that there’s an upgrade available? Or February is the busiest time for everyone?

WordPress 2.1 is upgraded to 2.1.1 while WordPress 2.0.7 is upgraded to 2.0.9.

Files changed in 2.1.1 from 2.1:

  • wp-includes/post-template.php
  • wp-includes/cache.php
  • wp-includes/formatting.php
  • wp-includes/category.php
  • wp-includes/post.php
  • wp-includes/version.php
  • wp-includes/js/scriptaculous/wp-scriptaculous.js
  • wp-includes/js/tinymce/tiny_mce_config.php
  • wp-includes/js/tinymce/wp-mce-help.php
  • wp-includes/js/tinymce/tiny_mce_gzip.php
  • wp-includes/capabilities.php
  • wp-includes/cron.php
  • wp-includes/functions.php
  • wp-includes/bookmark-template.php
  • xmlrpc.php
  • wp-admin/admin-ajax.php
  • wp-admin/admin-functions.php
  • wp-admin/custom-header.php
  • wp-admin/options-general.php
  • wp-admin/edit.php
  • wp-admin/index-extra.php
  • wp-admin/options-reading.php

Files changed from 2.0.7 to 2.0.9 (version 2.0.8 was tagged for Debian, but never announced):

  • wp-includes/cache.php
  • wp-includes/wp-db.php
  • wp-includes/version.php
  • wp-includes/js/tinymce/wp-mce-help.php
  • wp-includes/js/tinymce/tiny_mce_gzip.php
  • wp-includes/classes.php
  • wp-includes/functions.php
  • wp-includes/rss-functions.php
  • readme.html
  • wp-admin/edit-form-advanced.php
  • wp-admin/link-import.php
  • wp-admin/link-categories.php
  • wp-admin/user-edit.php
  • wp-admin/options-permalink.php

This time I not going to upgrade yet, as if something is broken I can’t fix it right away 😀

Moment of Silence

It has been quite a while I have the chance to update this blog. February is the busiest month ever for myself, and I still have a week to go until it all ends.

I have not been sleeping well since I am on 24×7 standby and holding a pager. Indeed, life is hard. I even dozed off at my desk with my home PC, my home laptop, and my work laptop. Luckily the VPN connection is working quite okay otherwise I would have to drive to the office every time I get paged.

It’s not that I am complaining or anything, just to let you know what happened to this blog. Actually you can see the pattern – from 40 posts in December 2006, the number decreased to 26 in January 2007. And this month I am not even sure I can pass the 10 post milestone.

I think after February I am going to claim all the time-off I can get due to out of office hour work, and finish up many pending tasks.

Until next time, see you guys around.

Iceweasel

iceweasel_icon.png

Have you ever heard of the browser named Iceweasel? Of course not, if you’re not using Debian. One of my machine at home is running a Debian Etch installation (my torrent box), and a few days ago I ran apt-get upgrade to upgrade the packages.

I was quite annoyed at first, as it’s trying to install a new package (not to mention the huge size) but I let it anyway. Earlier today I launched the web browser in my Xfce and Iceweasel was loading…

Iceweasel is a rebranded Firefox, and exist in 2 independent projects: one by Gnuzilla, and the other one by Debian.

Iceweasel was created since Mozilla demanded that Debian complies to some of the policies and terms that Debian finds unacceptable.

The other products are also re branded. Thunderbird became Icedove and Seamonkey became Iceape.

The current release of Gnuzilla IceWeasel is based on the 1.5.0.7 version of Mozilla Firefox, while the current version of Debian Iceweasel is based on the 2.0.0.1 release of Firefox.

deer_park_globe.png

The most obvious reason for this name change was that Mozilla demanded that Debian retain all branding from Mozilla if they were to continue using the Firefox name. However, because of the Debian Free Software Guidelines that said no non-free artwork and plugins are allowed, they were unable to comply. This generic, non-branded icon on the right was used for Firefox in Debian.

What I can see so far is that only the name changed. All of my plugins can still be used and upgraded normally. As for my active machines, however I always use the extracted package from Mozilla so there would be no way I would realize about the existence of Iceweasel.

Iceweasel. Cute name?