chrometweaks.org

Where can I buy iPage web hosts that offers cheapest iPage web hosting?

Click Here To View All Answers...


My 1st question is: Where can I buy iPage web hosts that offers cheapest iPage web hosting? Looking forward for any answer. Second question.. I am using MS SQL server 2000 for my database. I am trying to display a text field value from a table in my database in a HTML textbox. The display is truncated as soon as a blank space is encountered. How can this be corrected?.

Eg. I want to display 'Prathima B S' in a text box.

Only 'Prathima' is diplayed. The initials are truncated..

Note: this happens only when I try to display a text value fetched from a table. If I give a constant, there is no problem..

Comments (5)

I would like to know the answer too. Anyone here know what is the answer to your question. I'll do some investigation and get back to you if I find an anything. You should email the people at iPage as they probably could give you help..

Comment #1

I use SQL Server, with the nvarchar cell setting and am able to get entire sets of data with tons of spaces. We may need to see your code for the insert...

Comment #2

Also make sure when you set the value of the textbox it is INSIDE quote: <input type=text name=whatever value="$form.value#">.

If not, it will only assign up the first space...

Comment #3

I have printed below the code I am using to display text in a textbox. Here the table field addr is of type nvarchar(as you had suggested previously) and name is of type varchar. Both the fields are being truncated at the first space encountered when displayed in the html textbox!!!!.

The size (set to 100) is enough and more as I am filling only 25 characters..

Set conn = Server.CreateObject("ADODB.connection").

Set rs=server.CreateObject("ADODB.recordset").

Conn.open "HELPDESK","sa","sa".

Sql="select * from prat1".

Set rs=conn.Execute(sql).

Rs.MoveFirst().

While not rs.EOF.

Cname = rs("cname").

Caddr = rs("addr").

Rs.MoveNext().

Wend.

%>.

<INPUT type="text" id=text1 name=text1 value = <%=cname%>>.

<BR>.

<INPUT type="text" id=text2 name=text2 value = <%=caddr%> size=100>..

Comment #4

Prathima,.

I had already suggested that you put your value in quotes, else it will only assign up to the first space... but I see your code without quotes in the value:.

<INPUT type="text" id=text1 name=text1 value = <%=cname%>>.

<BR>.

<INPUT type="text" id=text2 name=text2 value = <%=caddr%> size=100>.

If you view the source you should see that all the data made it into the form tag, but the HTML recognizes only the entry to the first space..

Change it to:.

<INPUT type="text" id=text1 name=text1 value =.

".

<%=cname%>.

".

>.

<BR>.

<INPUT type="text" id=text2 name=text2 value =.

".

<%=caddr%>.

".

Size=100>.

And all should be well..

The reason for this is that HTML responds well to things outside of quotes as long as there are no spaces or special characters. This is really a HTML problem...

Comment #5

And for your viewing pleasure, look at the following simplified code.... and view the page that is renered. Notice that without quotes, the HTML will only assign the value up to the space..

<html>.

<head>.

<title>pop-up</title>.

</head>.

<body>.

<form>.

<INPUT type="text" id=text1 name=text1 value =myValue>.

<BR>.

<INPUT type="text" id=text2 name=text2 value =my value>.

<BR>.

<INPUT type="text" id=text2 name=text2 value ="my value">.

</form>.

</body>.

</html>..

Comment #6


This question was taken from a support group/message board and re-posted here so others can learn from it.