Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Javascript help - spaces?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 15 March 2002 :  05:00:39  Show Profile  Visit Azaniah's Homepage
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

Posted - 15 March 2002 :  05:06:22  Show Profile  Visit Kat's Homepage
It would treat "Test One" as a string. What are you trying to do - more detail please?

You can't have spaces in variable names but I suspect you already knew that.

KatsKorner

For Installation help: http://www.aslickpage.com/snitz_help.html
For Snitz Mods: http://ls3k.com/snitz/

Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 15 March 2002 :  05:15:17  Show Profile  Visit Azaniah's Homepage
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.
Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 15 March 2002 :  05:26:35  Show Profile  Visit Azaniah's Homepage
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.
Go to Top of Page

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 15 March 2002 :  06:12:54  Show Profile  Visit Kat's Homepage
Az,

you can't have spaces in variables with VBScript either. I can take a look but I can't promise how long for as I am at work.

Can you help me a bit and tell me what you are trying to do?

kkelly@his.co.uk

KatsKorner

For Installation help: http://www.aslickpage.com/snitz_help.html
For Snitz Mods: http://ls3k.com/snitz/

Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 15 March 2002 :  06:19:38  Show Profile  Visit HuwR's Homepage
Off the top of my head, I can't think of any language that would allow spaces in variable names

Go to Top of Page

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 15 March 2002 :  06:36:13  Show Profile  Visit Kat's Homepage
neither can I..

KatsKorner

For Installation help: http://www.aslickpage.com/snitz_help.html
For Snitz Mods: http://ls3k.com/snitz/

Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 15 March 2002 :  08:40:23  Show Profile  Visit Azaniah's Homepage
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.
Go to Top of Page

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 15 March 2002 :  09:05:04  Show Profile  Visit Kat's Homepage
Ok Az,

Glad you sorted it

KatsKorner

For Installation help: http://www.aslickpage.com/snitz_help.html
For Snitz Mods: http://ls3k.com/snitz/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.26 seconds. Powered By: Snitz Forums 2000 Version 3.4.07