Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
In vb script Programming Space Function Not working .. tell me the Reason if u now
Posted
Updated 21-May-13 0:03am
v2
Comments
Prasad Khandekar 21-May-13 6:13am    
What do you mean by Space Not working. Please provide more details.
meranaamshahul 21-May-13 6:20am    
<html>
<body>
<script type="text/vbscript">
for i=1 to 5
for j=1 to 5
if(i=j) then
document.write(i)
document.write(Space(10) & i)
---------------------
else
document.write(" ")
end if
next
document.write("</br>")
next
</script>
<body>
</html>

in above program i used Space Function... but space not added
i underlined Space Function
BiteForce 21-May-13 7:13am    
yeah, cuz </br> creates a new line, there´s no additional whitespace added.

nice regards

Html reflows documents, removing extraneous spaces. If you want hard spaces in the you have to replace the spaces charater with the HTML string for a non-breaking space character, &nbsp;
 
Share this answer
 
v2
Comments
Maciej Los 21-May-13 8:10am    
+5
It is working ;) but HTML doesn't understand spaces ;)

You need to replace " " with &nbsp;

Have a look here:
http://www.w3schools.com/vbscript/func_space.asp[^]
http://www.w3schools.com/html/html_entities.asp[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900