OBCT
asked on
Creating an XML string
In a recent project I have been working on, I have an input box that I have prevented users from entering in unapropriate words by using an array and a "for" loop.
This is what my code looks like.
badWords = ["milk", "juice", "cordial", "wine", "beer"];
mybutton.onRelease = function ()
{
if (this._parent.txtBox.lengt h > 0) {
for (i in badWords) {
if (txtBox.indexOf(badWords[i ])>-1) {
status = "No Swearing";
return;
}
}
}
}
How can I achieve this same idea, however using values from an external xml file?
Cheers
-OBCT
This is what my code looks like.
badWords = ["milk", "juice", "cordial", "wine", "beer"];
mybutton.onRelease = function ()
{
if (this._parent.txtBox.lengt
for (i in badWords) {
if (txtBox.indexOf(badWords[i
status = "No Swearing";
return;
}
}
}
}
How can I achieve this same idea, however using values from an external xml file?
Cheers
-OBCT
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you, blue. You are a genius :D
Cheers for that
-OBCT
Cheers for that
-OBCT
ASKER