tpeck
03-14-2003, 10:31 AM
Hi all,
I would like to know how to add a space in javascript that "sticks"and doesn't resolve to nothing.
Here is my code:
obj_table_time.innerHTML = " " + day + " "+date.getDate()+" " + maand +" < " +date.getHours() + ":" + minutes +":" + seconds +" >";
It doesn't really matter what the code is trying to do, I just want the first space to register as a REAL space. At present it just gets wiped out.
Interestingly, all spaces within quotation marks seem to get wiped out UNLESS there is a character within them. So what are the spaces there for anyway? What is going on? Or rather, what makes a HARD space?
Many thanks,
Terry
I would like to know how to add a space in javascript that "sticks"and doesn't resolve to nothing.
Here is my code:
obj_table_time.innerHTML = " " + day + " "+date.getDate()+" " + maand +" < " +date.getHours() + ":" + minutes +":" + seconds +" >";
It doesn't really matter what the code is trying to do, I just want the first space to register as a REAL space. At present it just gets wiped out.
Interestingly, all spaces within quotation marks seem to get wiped out UNLESS there is a character within them. So what are the spaces there for anyway? What is going on? Or rather, what makes a HARD space?
Many thanks,
Terry