-
[F8] Sting replace help
I have a dynamic text box that is populated by previous frames input boxes. The call to populate the dynamic box is vary large and contains more than just quoted text and variable names.
Everything works perfect, but I have an issue I want to remedy. If I leave an input box blank in the previous frames I get "undefined" in the dynamic text box.
I am using this string replace technique and it works well for what it does, but I need it to check the whole dynamic text box after being rendered for the "undefined" not a "string of text here" but instead a "dynamic.text"
I can't figure it out as nothing is working. Ideas?
~MoN
-
When you 'copy' the input textdields into the dynamic, don't add the blanck ones.
If you start by declaring all inputs with a "" value:
PHP Code:
input1.text="";//same for all
Then in your copy function, add an if statement
PHP Code:
for (i=0; i<numInputs; i++) {
if (!this["input"+i].text == "") {
makeCopy();//call any custom function you have
}
}