[thelist] testing for empty in javascript or vbscript

Marc Seyon seyon at delime.com
Mon Jul 15 19:32:11 CDT 2002


Message from Tom Dell'Aringa (7/15/2002 05:17 PM)
>Actually, no - this should work, thanks to JS loose types. Do this in
>a blank document.
>
><script>
>i = 2
>zip = "zip" + i;
>document.write(zip)
></script>
>
>change i to whatever you want. You will get zip2 or whatever number
>you input.

You will get "zip1" or "zip2" as a string. I think what Shashank means is
you will need the eval() function to convert that string to a variable name.

Right?
-m



More information about the thelist mailing list