[Javascript] echo value padded with spaces?

Skip Evans skip at bigskypenguin.com
Mon May 5 21:00:00 CDT 2008


Hey all,

I have a login function that has been working fine 
for a very long time. All of a sudden (or at least 
for a reason I could not nail down) it began to 
fail to validate properly.

I had this on the PHP side when a user name 
password combination failed:

echo 'false';

And in the JS I simply did this:

if (ret=='false')
	alert('Invalid login')

But when I did an alert on the return I got this:

' false'

The echoed value 'false' is now coming through 
with space padded on the left side.

Can anyone explain this to me???

Thanks globules!
-- 
Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison, WI 53703
608-250-2720
http://bigskypenguin.com
=-=-=-=-=-=-=-=-=-=
Check out PHPenguin, a lightweight and versatile
PHP/MySQL, AJAX & DHTML development framework.
http://phpenguin.bigskypenguin.com/



More information about the Javascript mailing list