By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,659 Members | 1,611 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,659 IT Pros & Developers. It's quick & easy.

after reloding the page spaces between words is removing

P: 1

In asp page I stored the textbox values in one javascript variable:
var strline1side1 = document.frmartwork.side1textbox1.value;
Then I save the same variable in one javascript cookie variable:


Now after this I read this cookie in asp variable
strtextbox1 = request.Cookies("lineside1")

and assigned this variable to test value of textbox.

<input type="text" value="<%=strtextbox1%>" id="side1textbox1">

If I write "this is test" in textbox then after reloading the page it showing me "thisistest" space is removing .

Why this is happening.

Please help me
Sep 29 '11 #1
Share this Question
Share on Google+
1 Reply

Expert 2.5K+
P: 3,405
I bet the problem comes when you save the cookie. Try using a replace statement to replace the spaces with "+". It looks like that part is done with javascript, so I am not going to try to help with that (not a javascript expert). But if what I think is happening, replacing the spaces with plus signs in the cookie will correct the issue.

Sep 30 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.