Javascript

...now browsing by category

 

jQuery turns 3 with the release of jQuery 1.3

Friday, January 16th, 2009

jQuery
January 14th, 2006 brought to the development world what would soon become one of the most influential javascript frameworks.  jQuery, the write less, do more framework, has since taken on a life of its own and is now used by many web sites today, from Google, to Dell, and even Virginia Tech.

Happy Birthday jQuery!

Simple Javascript to Combat Spam

Monday, August 25th, 2008

Before you read any further, take into context this isn’t going to fully help you in terms of lessening your spam. However, it is a neat trick and will help some, or at least deter some spamming bots from picking your e-mail address and using it for spam.

While at work today I was performing some maintenance on a project that was handed to me and I noticed a tiny bit of javascript used to print an e-mail address, but by doing so kept it seperate and not connected.

<script type="text/javascript">
    emailE=('roberthash@' + 'yahoo.com')
    document.write('<A href="mailto:' + emailE + '">' + emailE + '</a>')
</script>

What you see first is that a variable is assigned two values that are added together. By splitting the e-mail into two pieces (in theory), this will assist in deterring spam bots searching for a valid e-mail address.

emailE=('roberthash@' + 'yahoo.com')

From there we utilize the document.write() function to print this text to the browser window.

document.write('<A href="mailto:' + emailE + '">' + emailE + '</a>')

Another beautiful part is that if Javascript is not installed, this means there won’t be an e-mail address showcased. However, this could be a pain if you have someone trying to find your e-mail address that has a legit reason to contact you - but doesn’t have Javascript.

As usual, it is a method to be used at your own risk or if you feel it is indeed the solution for your project.

With further research, I have found the origination of this code, which can be found at http://www.joemaller.com/js-mailer.shtml.

As you can see - it is a very simple approach that even a novice programmer can understand. Who says you can’t learn new tricks?

Png Fix for IE 6.0

Friday, August 22nd, 2008

For those of us that enjoy using PNG graphics in our layouts, it is common knowledge that Internet Explorer is a point of frustration in the entire process.

Fortunately javascript can be utilized to assist in this matter. Be sure to use the defer type.

<html>
<head>
<!--[if lt IE 7.]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->
</head>
<body>

For an example of the javascript one could use to show the PNG format in IE6, check out the link below:

You think you know Javascript …

Thursday, May 10th, 2007

I recently saw a link on del.icio.us that I thought was noteworthy to pass along. You may have noticed that with my blogs lately, I have written quite a bit about Javascript (or at least complained about it, your choice).

Anywhoo, on to the article. It is a four part video series focusing on a presentation by Yahoo’s Douglas Crockford. If you are just starting, I recommend you to check out the slides first. For those that have dabbled in Javascript before, start with the videos by checking out the link below!

http://101out.com/js.php