PDA

View Full Version : about "#" sign


gcheung
05-23-2003, 11:21 PM
i've got an input text box for a string by user, a new record can be done in the database with that input. However, if it involves a "#" pound sign, no new record can be done.

i've tried to test in the same page, let's say, page A, using document.write to display that input, eg. 111111#111, it can display properly, but when i pass this input as a querystring to page B, and use response.write to display it, only 111111 can be shown (others are missed), and no new record can be done........

see if any of you have meet this issue before and pls help. thanks!

kumareshh
08-28-2006, 11:55 PM
Good Question!.

some of the Special characters are split the string. You have to replace string "$" instead of "#". and get the value.

Eg: re = /(\#)/gi;
var SelValue = dropdown.options[myindex].value;
var baseURL = SelValue.replace(re,'$')

chilwal_dh
08-29-2006, 01:18 AM
if u'll use querystring it will truncate # character. to solve this problem u have to submit a form.

<form method="get">
<INPUT TYPE="text" NAME="a">
</form>

now u can get values of a . it will not truncate the vales after #


i've got an input text box for a string by user, a new record can be done in the database with that input. However, if it involves a "#" pound sign, no new record can be done.

i've tried to test in the same page, let's say, page A, using document.write to display that input, eg. 111111#111, it can display properly, but when i pass this input as a querystring to page B, and use response.write to display it, only 111111 can be shown (others are missed), and no new record can be done........

see if any of you have meet this issue before and pls help. thanks!

chilwal_dh
08-29-2006, 01:25 AM
u can use this Server.URLEncode
str="111111#1111"
<A HREF="testqstr.asp?a=<%=Server.URLEncode(str)%>">Send to page</A>

it will not truncate it after #

i've got an input text box for a string by user, a new record can be done in the database with that input. However, if it involves a "#" pound sign, no new record can be done.

i've tried to test in the same page, let's say, page A, using document.write to display that input, eg. 111111#111, it can display properly, but when i pass this input as a querystring to page B, and use response.write to display it, only 111111 can be shown (others are missed), and no new record can be done........

see if any of you have meet this issue before and pls help. thanks!