May
24
2006
0

Google Web Toolkit

Wow, Google just released an AJAX programming tool called the Google Web Toolkit.

It is a AJAX development environment that allows you to easily develop applications like Google Maps and GMail. The language is Java (not javascript), althought it ends up outputting a mixture of javascript and HTML when you “compile” it.

I don’t know much of Java, but this has peaked my interest. I’m definitely going to be playing around with this one.

Written by Tom in: AJAX, Javascript |
Apr
04
2006
12

Javascript String to Int

Handy function:

var yourInt;
yourInt = parseInt(str);

More Info: http://www.devguru.com/Technologies/ecmascript/quickref/parseint.html

Written by Tom in: Javascript |
Mar
24
2006
--

Regular Expression Search Engine

Wow! This is a great site: RegExLib (Regular Expression Library)

Excuse my exuberance, but I’ve been creating a lot of long regular expressions from scratch lately and it’s time consuming! This is a great resource for anyone wanting to use regular expressions in their code.

Written by Tom in: ASP.NET, Classic ASP, Javascript, Random, VBScript |
Feb
03
2006
--

javascript lcase

The javascript equivalent to vbscript’s lcase() function is .toLowerCase(). Here’s an example:

var myVar;
myVar = ‘HELLO’;
myVar = myVar.toLowerCase();
alert(myVar);

The output is, of course, “hello”.

As you could guess, the equivalent to vbscript’s ucase() function is .toUpperCase(). Pretty self explanatory. Here’s a link to other javascript string functions.

Written by Tom in: Javascript |
Jan
11
2006
0

Great Photo Display Script (JavaScript & CSS)

Great piece of javascript mixed with CSS enlarges a thumbnail in response to a click. It greys out the rest of the screen and shows the whole image. Hardly any programming required too!
http://www.huddletogether.com/projects/lightbox/

Written by Tom in: CSS, Javascript |
Dec
28
2005
1

Yahoo GeoCoding API and Google Maps API

It’s long been on my mind to use the Google Maps API on some of my sites, but the last hurtle has always been getting the raw longitude and latitude to satisfy the Google Maps API. Google Maps allows you to insert their maps into any web page using javascript. The only catch is you have to give it the latitude and longitude. It doesn’t take street addresses. They recommend using a free geocoder (an application that takes a street address and returns a latitude and longitude.), but they don’t give any real recommendations.

Yahoo!, however does have a free geocoder! http://developer.yahoo.net/maps/rest/V1/geocode.html

Matthew Hazlett just wrote a great tutorial on using both of these APIs to create a map application that takes a street address and turns it into a Google Map!
Here’s the link.

http://www.codeproject.com/Ajax/GeoLocation.asp

Written by Tom in: ASP.NET, Javascript |
Dec
21
2005
0
Dec
07
2005
0

ASP.NET Google AutoComplete (or AutoSuggest)

A while back I wrote a post on an inventory of existing javascript autocomplete controls. I was writing an application that required one and found most of them to be unsuitable for what I was doing. I ended up using WICK (Web Input Completion Kit) an creating my own ASP.NET user control around it.

An article just came out in CodeProject, however that claims to do everything I was looking for. I haven’t had a chance to look at it yet, but when I do, I’ll let you know how it goes.

Here’s the article: http://www.codeproject.com/aspnet/AddingGoogleSuggest.asp

Written by Tom in: ASP.NET, Javascript |
Nov
15
2005
--

Javascript InStr function


Is there a function in Javascript that is the same as VBScript’s instr? Yes! It’s string.indexOf

For info on how to use it, check out DevGuru’s page on IndexOf

Written by Tom in: Javascript |
Nov
14
2005
3

Replacing Checkboxes and Radio Button’s Programmically with Javascript

There is a great article and javascript on CodeProject.com. The code was originally written by BrainError.

I had to add support for labels, however. If you had a label like this:

it wouldn’t update the image if you clicked it. I added the following to the js file:

In function replaceChecks, I added one line: inputs[i].onclick = new Function(’imgChange(’+i+’)');

Here’s the relevant section of code:


//set image
if(!inputs[i].disabled) {
img.onclick = new Function(’checkChange(’+i+’)');
inputs[i].onclick = new Function(’imgChange(’+i+’)');
}

I also had to add a separate function here:

//change the image if the checkbox is changed.
function imgChange(i) {

if(inputs[i].checked) {
document.getElementById(’checkImage’+i).src=imgCheckboxTrue;
} else {
document.getElementById(’checkImage’+i).src=imgCheckboxFalse;
}
}

Written by Tom in: Javascript |

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes