propaganja
12-16-2007, 01:42 PM
helow!hope sombody can help me with my search function..
i want to moptimize my search..
coz it only search in an exact word,what i want to do is
he will also found related words
just like a google search
modify my function to a better one would me much appreciated...
thank u..
here's my function..it search in an shared object
import mx.controls.Alert;
var Info_SObject:SharedObject = SharedObject.getLocal("Info_SObject_SOL", "/");
function searching() {
if (search_ti.text == "") {
Alert.show("Nothing to search! ","User Alert");
} else {
searchLow = search_txt.text.toLowerCase();
for (i=0; i<Info_SObject.data.estabName.length; i++) {
if (searchLow == Info_SObject.data.estabName[i]) {
Alert.show("found","alert");
} else {
Alert.show("No matsing found! ","User Alert");
}
}
}
}
i want to moptimize my search..
coz it only search in an exact word,what i want to do is
he will also found related words
just like a google search
modify my function to a better one would me much appreciated...
thank u..
here's my function..it search in an shared object
import mx.controls.Alert;
var Info_SObject:SharedObject = SharedObject.getLocal("Info_SObject_SOL", "/");
function searching() {
if (search_ti.text == "") {
Alert.show("Nothing to search! ","User Alert");
} else {
searchLow = search_txt.text.toLowerCase();
for (i=0; i<Info_SObject.data.estabName.length; i++) {
if (searchLow == Info_SObject.data.estabName[i]) {
Alert.show("found","alert");
} else {
Alert.show("No matsing found! ","User Alert");
}
}
}
}