/    Sign up×
Community /Pin to ProfileBookmark

I am a college student at Furman University and I am doing a project for Computer Science in which I am building informative web pages for students. I really want to use the javascript distance calculator between cities that is offered on this site but Greenville, SC is not offered. I figured out how to put Greenville on the list but I cannot figure out how to read that code that tells where the city is located because it is in “al” string is there anyway to convert it so Greenville can be added to the list. Heres a sample from the actual script:

<script language=”JavaScript”>
<!– Hide from JavaScript-Impaired Browsers
var l=0;
var r=0;
var tc=””;
var al=” abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ”
+”123456789″;
var ns=”0123456789″;

function iA(){
this.length=iA.arguments.length;
for (var i=0;i<this.length;i++){
this[i]=iA.arguments[i];
}
}
/* 5829 byte database of distances uses position in the
string “al” to substitute for the numerics, saving a bit
over 10k download to visitors. *
/
var a=new iA(61);
a[0]=”Albany, New York* tdjaddcdu jgybagc hhfdggqihbdhhbfdphrc”
+”khfevbniu aaqghamejgm zcmfBehflcn iclejcndafeao malcbfxidebdC”
+”bqiAfjdvesgBeChxid ni”;
a[1]=”Albuquerque, New Mexico*
n xfriiileidvbqgq p pcedmaoipbn”
+”ffdddigofbglidcu helgjepdgheihhhalijasgmhlblcl t riedhiqdsedf”
+”pcw mghbjbjdf gchakanereei”;
a[2]=”Atlanta, Georgia* mcfer aevbkaiabie bdnhgagcbaeihbncifgc”
+”ndmipfifgiecd cahbsheeuidbchffh kbbedhheefhcjadcgercfhkgzfobx”
+”aegscj uexhzcfbie”;
a[3]=”Augusta, Maine*
fgxgoaCfbggclbjdkavblehglajatbvdogjfzcri”
+”yacgublbqengqbDcqgG lepcrcmbpdnbraeahiscqapbeiCbhfagGhueEdnfz”
+”dviFgGhFfgbrh”;
a[4]=”Baltimore, Maryland* sbggxadccgegcfdbpggbcfebdcmfpdjdeas”
+”hmes cbn egjagejgx jdzefdiajigikag kdb bcmakehia wabeedB pczb”
+”hctgpczhBbAa dlh”;
a[5]=”Billings, Montana*
qhfav qbuhqbt dflcpatfpanbeeihoblffaf”
+”gu oinaqbv jdjenbldocnfybkfhcp rctdthkeiavcshl pfvgi cbifmafd”
+”obmakihcuaje”;
a[6]=”Birmingham, Alabama* tglci ddefcinbffgccfegfdmchcgflgm p”
+”cjhg dhbedfgcrcdctecfbfgegdjgaiceihgagbhheehgphgimdyinavheaqi”
+”hfsiwgydgdhc”;
a[7]=”Boise, Idaho*
zivaxiudwegcqatcwisgoihdmfshl lafczarbretd”
+”xgnbfgqghescrbBgqdnhshuexiybndldzdxcihucAidcifdcpgcdpgihfeebw”
+”gmf”;
a[8]=”Boston, Massachusetts* dgidgehesbj ffifh qet mdh whpevga”
+”arcicnfkfndAendDbifmdobjimijioabaehpingm cbzgegaaEdsaBglawhtb”
+”BhEcDbdepc”;
a[9]=”Buffalo, New York*
icdegao edaih ccmfoehecfsgkiqidbnieak”
+”bjijavhjfyheeibn fciegblfcgf lbjbl cfvbbbedzgncxegesdpcyczgyh”
+”dal “;
a[10]=”Charleston, South Carolina* dhbaqaiagcaafejiqbl hdq oas”
+”fhcjegbfgbdkavhhcxifag eijbmcedgcggddkdlgchffubfejeCeraAbhfui”
+”lhxbBbCcecld”;
a[11]=”Charleston, West Virginia*
bgnadgbecfagjemggid phkdpbfh”
+”khcbh ffgfucgcxabffcjaefhgdbiaeedajbidh dhshbchhyemgwheardmcw”
+”dz xgcdif”;
a[12]=”Charlotte, North Carolina* pbgdeb iddjfohjffcpemhrbgdjc”
+”eefcciigv ghxadffcgdhckedbgbfbcak kdeceatce ifAhpezbgcthldxaA”
+”bAdchji”;
a[13]=”Cheyenne, Wyoming*
ihmcpfm hha fdldgighcerekajhlgqefhhe”
+”jgkbl kduej hhlfmhqer fie rgqfidnctfkhcbigidddjfkikilepdfb”;
a[14]=”Chicago, Illinois* ceh cfibjbcdbhnffelgiajiaigejaedqhff”
+”tec edn idadgibhahghcdhkegiqddhjiubiasebinblatiugtegagc”;
a[15]=”Cleveland, Ohio*
faadkimfffagqdj paefmacbidiahbtihgwhce”
+”gcleddgfecjfdgeajchcjedctcacgcxcldvfehqfnewixhwicfja”;
a[16]=”Columbia, South Carolina* ecjcpbkagbpcncrdhajcfaf c jbu”
+”igfxbe fbfdhhladdfigbcijfkhddfatceijdBdpizaghublcwhAgAidhkg”;
a[17]=”Columbus, Ohio*
jeldffaip ieniffkgahh hcfhtbgcvdbaeikgd”
+”gghchibefefibgiifdhs aihgxdldvadbphmavfxcwedchg”;
a[18]=”Dallas/Ft Worth, Texas* ghg kffbjiihpibehidajdealccbn h”
+”cdemdjbieffebofmebaffk ndj larhtdjipgfflfbgmeqeucmacg”;
a[19]=”Denver, Colorado*
fglhfihhbet jcjfl qdfagfidjckbjduajdi”
+”bkhlhqiqgfcedrhqdhanctglfdbjchfeciek lfmdpbeb”;
a[20]=”Des Moines, Iowa* eikcdhibleiddhhcldb ncefqaeifboicgbef”
+”iihkbkeeeacmfjincghn rbfdp cgjgihqgrcr jfci”;
a[21]=”Detroit, Michigan*
pgibobgclhbhifjeggtbhhvichgbmicffied”
+”jgfegcjcgckgfatac i whkiv ecpgnewgx wcebif”;
a[22]=”El Paso, Texas* nefgvigdnbjcohidgbidhbnejgs odnflhk ues”
+”efhlephtgddqhxfpcjdkgkhhgefgcl qbschd”;
a[23]=”Fargo, North Dakota*
kaofm hcmapifbodjdraidkct egbdkamh”
+”nenghgdcrancpikcqcnieaohhekemcrgrbnbmcgc”;

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@CharlesJan 31.2005 — Best to find a server side way to do this. The US Federal Governmet is quite clear about this. Education falls under Title III of the ADA, and the W3C's Web Content Accessibility Guidelines are quite clear that you must make certain that somehow everything still works when JavaScript is turned off or not supported.
×

Success!

Help @furman2006 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...