Results 1 to 3 of 3
-
11-01-2005, 05:10 PM #1Aspiring Evangelist
- Join Date
- Jan 2003
- Location
- Roanoke, VA, US
- Posts
- 390
wildcard operator for javascript?
I have the following--
Code:var fieldRequired = Array("bitten[1]", "aggression[1]", "luxuryBath[1]");
var fieldRequired = Array("bitten[x]", "aggression[x]", "luxuryBath[x]");
I need 'x' to be a wildcard operator. Is this possible in JS?
-
11-02-2005, 03:13 AM #2Web Hosting Master
- Join Date
- Jul 2003
- Location
- Kuwait
- Posts
- 5,104
To put it very bluntly, no. You need to rethink your approach to this problem.
-
11-02-2005, 07:30 AM #3DigitalPunchCardMaker
- Join Date
- Oct 2004
- Location
- Moji
- Posts
- 2,107
ummm
if I got it right,
can't you use this?
Code:var x = "some value"; var fieldRequired = Array( "bitten["+x+"]", "aggression["+x+"]", "luxuryBath["+x+"]" );