Google
 

Reverse Resolution of IP Addresses with AJAX

Wednesday, June 21st, 2006

One of the things that came up recently at work is a way to resolve IP addresses to hostnames client-side without any server calls. Here are some of the possibilites that I thought off : o Using Javascript to call Java's java.net.InetAddress class to resolve (only works in Mozilla and Opera, ...

Saving and Loading Files from Web Pages via AJAX

Thursday, February 16th, 2006

I recently ran across a nifty project called "TiddlyWiki". One of the things that struct me as interesting features from the programming point of view is the fact that it is able to load and save itself to the user's hard drive using Javascript without any kind of server side ...

Inobstrusive Form Field Highlighting in JavaScript

Tuesday, January 3rd, 2006

One of the recent problem that I ran across at work is an easy way to do highlighting for form fields. Of course the best way would be CSS 2 (as shown here) but alas, IE does not support that. The alternative is JavaScript onFocus and onBlur method. However, one thing ...

Weird JavaScript problems

Tuesday, January 3rd, 2006

For quite some time I have been trying to track down a strange Javascript error. In one of the forms in our application, we have a dynamically generated set of DOM form fields generated on the fly via Javascript. Something like "document.myForm.appendField(field);". The page in question worked just fine in ...

Removing Vowels from Hebrew Unicode Text

Friday, June 3rd, 2005

One of the questions that recently came up is how to remove vowels from Hebrew characters in Unicode (or any other similar language). A quick look at Hebrew Unicode chart shows that the vowels are all located between 0x0591 (1425) and 0x05C7 (1479). With this and Javascript's charCodeAt function, it ...

Browser Differences in window.opener Behavior

Thursday, May 5th, 2005

Among the more persistent bugs I have been chasing recently involves a set of interrelated windows. The case in point was a parent window (A) that opened a child window (B) via JavaScript. The child window (B) was set to check whether the parent window (A) is still open before ...

How To Wrap Text in a Table Cell

Thursday, May 5th, 2005

An interesting question that came up today during work was how to wrap text in a table cell that does not contain any line breaks or spaces. For example: ThisIsCell1 ThisIsCell2 We want the text inside the cells to wrap to the next line instead of extending the table size. There are three ...

Making TurboTax.com Work on Linux

Tuesday, January 18th, 2005

(TurboTax now works fine with FireFox on Linux. This post will remain here for historical purposes.) I have using Intuit's online version of TurboTax for the past few years to file my taxes. However, this was the first year I used it in Linux. Logically, since it is a web based ...

Strange IE Bug

Tuesday, January 11th, 2005

Today I came across a VERY strange IE bug - a certain page would not work in IE6 under Windows XP SP2, while it worked fine in Opera, Mozilla and Firefox. The message shown would be as follows: Internet Explorer cannot open the Internet site [url] Operation aborted After more digging, I ...

Opening Popups in IE

Tuesday, January 4th, 2005

Recently I ran across a rather strange error with different browser. Popup windows could be maximized in Opera and Mozilla, but not in IE. The code I was using was as follows (click here to try): window.open('', '', 'width=200,height=200'); After some digging, I ran across the following snippet in MSDN: When the sFeatures ...

Tracking UPS Packages via JavaScript

Monday, January 3rd, 2005

A recent post at TechDigits about tracking UPS packages via RSS and web services got me thinking if the same is possible via Javascript and the XmlHttpRequest object (in IE and Mozilla). Since Google's Gmail and Google Suggest started using that object, it has become more popular. So after some ...

My First FireFox Bug

Thursday, November 11th, 2004

I filed my first bug with FireFox today: when running self.resizeTo() function in Javascript twice the toolbars on top strech a bit too far. You can try it for yourself below:

Hiding Table Rows in DHTML

Sunday, October 24th, 2004

One of the more fun things in DHTML is dynamic manipulation of page content. An interesting question that recently came up at work was hiding and displaying a single table row. The solution I came up with is pretty simply - set the CSS STYLE tag of the table row ...

Another IE JavaScript Difference - TypeOf Operator

Friday, October 22nd, 2004

Another rather annoying thing I just ran across is the difference in the implementation of the "typeof" operator in Javascript operating on functions. If you create a function in the parent window, assign it to a property of the parent window, and then pass it to the child window, IE ...

Validating SELECT Boxes in JavaScript

Thursday, October 21st, 2004

One of the more boring tasks in DHTML is validation of form data and specifically of INPUT and SELECT boxes. Since both have a ".value" property, we can save time and use the same code for checking both: if(selectBox.value == null || selectBox.value.length == 0) { alert('Nothing selected in select box!'); } else ...

Changing Web Page Content on the Fly

Tuesday, October 12th, 2004

An interesting problem that comes up often is a need to change a part of a web page without reloading the entire page. This is especially true when dynamic content like a list needs to be generated from a database and included in the page. The solution to this is ...