Reply
Sat 17 May, 2014 08:59 pm
I was trying to just pad a space before or after a variale value using document.write but no way, something like this
document.write( " " + i + " "); would never give me a distance b4 or after the rendered value of i. does any one knwo why?
@samy youssef,
White-space is not recognized. Try using the non line-break code
&n bsp;
Do not put a space between the
n and
b. I had to do that to keep it from displaying a blank.
@Zarathustra,
thank u for ur reply I'm going to try this now, actually i tried String.fromCharCode(32) but nothing happened. I appreciate your help
@Zarathustra,
Thank u, It worked; but it neede to be enclosed in a single quotes like this but it finally worked '&n bsp;'
@samy youssef,
Yes, sorry I assumed you knew that it needed quotes.