I am trying to look for certain data in a small remote .txt file to determine variables. The data in question is determined by METAR weather data which determines the sky condition/cloud cover.

Like here is a remote METAR report:

http://weather.noaa.gov/pub/data/obs...tions/CWBO.TXT

I need the ability to load that text, and search it for the following:

SKC
CLR
NSC
FEW
SCT
BKN
OVC
VV

If one of those are found, I need it to set a variable. Let's say the variable is m1 which determines m2:

Code:
if (m1 == "SKC") {
	var m2 = 1;
} else if (m1 == "OVC") {
	var m2 = 4;
}
Is there a way to have JavaScript load the remote .txt file so it can be searched for the values I listed above which would set var m1?