|
 |
asp_databases thread: Populating form boxes
Message #1 by Jean Halstad <J_Halstad@S...> on Thu, 26 Sep 2002 10:29:24 +0100
|
|
Am attempting to populate text and list boxes with information from a
recordset. Where a string has a space, it is being cut off so that only the
first word of the string appears in the text box.
If I do a response.write rs("AuthorName") then I get "John Smith", but not
when I do:
<input type="text" name="Author" size="100" value=<%=rs("AuthorName")%>>
I Just get "John".
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
Message #2 by Colin.Montgomery@C... on Thu, 26 Sep 2002 10:31:26 +0100
|
|
put quotes around the value attribute:
<input type="text" name="Author" size="100" value="<%=rs("AuthorName")%>">
HTH,
Col
-----Original Message-----
From: Jean Halstad [mailto:J_Halstad@S...]
Sent: 26 September 2002 10:29
To: ASP Databases
Subject: [asp_databases] Populating form boxes
Am attempting to populate text and list boxes with information from a
recordset. Where a string has a space, it is being cut off so that only the
first word of the string appears in the text box.
If I do a response.write rs("AuthorName") then I get "John Smith", but not
when I do:
<input type="text" name="Author" size="100" value=<%=rs("AuthorName")%>>
I Just get "John".
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
*******
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the
intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are
not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.
For further information about Clifford Chance please see our website at http://www.cliffordchance.com or refer to any Clifford
Chance office.
Message #3 by "Jonathan Charlton" <jcharlton@e...> on Thu, 26 Sep 2002 10:36:27 +0100
|
|
try and put a trim around it, there may be some white space that is not
showing the smith because you have exceeded the 100 chars in the text box.
Not rfeally convinced that this will solve your woes but its worth a try.
<input type="text" name="Author" size="100"
value=<%=trim(rs("AuthorName"))%>>
You may also wish to try adding the full rs reference so <input type="text"
name="Author" size="100"
value=<%=trim(rs.Fields.Item("AuthorName").Value)%>>
Hope it works.
-----Original Message-----
From: Jean Halstad [mailto:J_Halstad@S...]
Sent: 26 September 2002 10:29
To: ASP Databases
Subject: [asp_databases] Populating form boxes
Am attempting to populate text and list boxes with information from a
recordset. Where a string has a space, it is being cut off so that only the
first word of the string appears in the text box.
If I do a response.write rs("AuthorName") then I get "John Smith", but not
when I do:
<input type="text" name="Author" size="100" value=<%=rs("AuthorName")%>>
I Just get "John".
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
Message #4 by Marios Adamantopoulos <mario@t...> on Thu, 26 Sep 2002 10:53:39 +0100
|
|
Remember that if your text has "(double quote) in it you will have a problem
It will be something like:
<input type="text" name="Author" size="100" value="Hello "Mr" ">
So what will be shown in the text box will be
[Hello ]
You can use instead single quotes
<input type="text" name="Author" size="100" value='<%=rs("AuthorName")%>'>
But then again you will have a problem with the single quote
-----Original Message-----
From: Colin.Montgomery@C...
[mailto:Colin.Montgomery@C...]
Sent: 26 September 2002 10:31
To: ASP Databases
Subject: [asp_databases] RE: Populating form boxes
put quotes around the value attribute:
<input type="text" name="Author" size="100" value="<%=rs("AuthorName")%>">
HTH,
Col
-----Original Message-----
From: Jean Halstad [mailto:J_Halstad@S...]
Sent: 26 September 2002 10:29
To: ASP Databases
Subject: [asp_databases] Populating form boxes
Am attempting to populate text and list boxes with information from a
recordset. Where a string has a space, it is being cut off so that only the
first word of the string appears in the text box.
If I do a response.write rs("AuthorName") then I get "John Smith", but not
when I do:
<input type="text" name="Author" size="100" value=<%=rs("AuthorName")%>>
I Just get "John".
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed If
you have received this e-mail in error please notify seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned by
the Sea Fish Industry Authority.
*******
This message and any attachment are confidential and may be privileged or
otherwise protected from disclosure. If you are not the intended recipient,
please telephone or email the sender and delete this message and any
attachment from your system. If you are not the intended recipient you must
not copy this message or attachment or disclose the contents to any other
person.
For further information about Clifford Chance please see our website at
http://www.cliffordchance.com or refer to any Clifford Chance office.
Message #5 by Jean Halstad <J_Halstad@S...> on Thu, 26 Sep 2002 11:33:38 +0100
|
|
This is the correct solution. It is so obvious when you see it. Thanks a
million.
Jean
-----Original Message-----
From: Colin.Montgomery@C...
[mailto:Colin.Montgomery@C...]
Sent: 26 September 2002 10:31
To: ASP Databases
Subject: [asp_databases] RE: Populating form boxes
put quotes around the value attribute:
<input type="text" name="Author" size="100" value="<%=rs("AuthorName")%>">
HTH,
Col
-----Original Message-----
From: Jean Halstad [mailto:J_Halstad@S...]
Sent: 26 September 2002 10:29
To: ASP Databases
Subject: [asp_databases] Populating form boxes
Am attempting to populate text and list boxes with information from a
recordset. Where a string has a space, it is being cut off so that only the
first word of the string appears in the text box.
If I do a response.write rs("AuthorName") then I get "John Smith", but not
when I do:
<input type="text" name="Author" size="100" value=<%=rs("AuthorName")%>>
I Just get "John".
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
*******
This message and any attachment are confidential and may be privileged or
otherwise protected from disclosure. If you are not the intended recipient,
please telephone or email the sender and delete this message and any
attachment from your system. If you are not the intended recipient you must
not copy this message or attachment or disclose the contents to any other
person.
For further information about Clifford Chance please see our website at
http://www.cliffordchance.com or refer to any Clifford Chance office.
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
|
|
 |