Author |
Topic |
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 15 March 2002 : 05:00:39
|
Does anyone know if Javascript has problems with spaces?
Playing with a half MOD, and need to be able to populate select boxes from various sources (DB, functions etc).
The problem I'm havin is the if for example I have a item "Test_One" it works. "Test One" however, doesn't.
I know this is a extremely lame explaination of the problem, but I'm after a general "didn't you know javascript hates spaces" answer.
Unless there are some guru's out there that can help with the actual code?
Cheers Az
------- Eagles fly!, but weasels don't get sucked into jet engines. |
|
Kat
Advanced Member
United Kingdom
3065 Posts |
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 15 March 2002 : 05:15:17
|
Hmm,
I didn't
That could be it.. my javascript isn't great.
Now this sounds really dumb, but does vbscript allow variables to have spaces? Perhaps I will have to convert the javascript to vbscript.
Cheers Az
------- Eagles fly!, but weasels don't get sucked into jet engines. |
|
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 15 March 2002 : 05:26:35
|
Kat,
Seeing as you appear to be good with javascript, would you mind if I email you a couple of files? That way you can see exactly what I'm trying to do...
*looks hopeful*
Cheers Az
------- Eagles fly!, but weasels don't get sucked into jet engines. |
|
|
Kat
Advanced Member
United Kingdom
3065 Posts |
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 15 March 2002 : 06:19:38
|
Off the top of my head, I can't think of any language that would allow spaces in variable names
|
|
|
Kat
Advanced Member
United Kingdom
3065 Posts |
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 15 March 2002 : 08:40:23
|
Hmm,
Oddly McOdd.
Anywho, I've gotten around the issue. Just introduced another case in the chkString function to replace spaces with _ and vice versa the other end.
I "think" it's working.
Thanks for the info
Cheers Az
------- Eagles fly!, but weasels don't get sucked into jet engines. |
|
|
Kat
Advanced Member
United Kingdom
3065 Posts |
|
|
Topic |
|