Using Post but losing data due to spaces???

D

Drifter

I am generating a list with checkboxes from a database:

Response.Write (" <FORM METHOD='POST' ACTION='listpage.asp?Verified=True'
NAME = 'Subscriptor' onsubmit=""return
howManyChecked('Subscriptor','ITitle'',9,9,'Inservice');"">")

<Input Type='CheckBox' Name='ITitle' Value=" & rsData("Name") & ">...

<% 'Response.Write Request.Form("ITitle") %>

I have some code that verifies if 5 titles are checked (howManyChecked),
then I send this list of 5 titles to the next area. Problem is I am asking
for the "Name" from the database, and the name contains spaces. When I go to
generate the list on the next area I get only the first Word, if there is a
space in the "Name" the collection takes this as the end of the Name data,
and goes onto the next Name, taking only the first word again.

I can get around the issue by changing it to the ID being transferred in the
ITitle, and then calling database to collect the data (Name) again. This
seems an unnecessary step. Any ideas how I can drop the problem of losing
data after the spaces?

D
 
R

Roland Hall

in message

: <Input Type='CheckBox' Name='ITitle' Value=" & rsData("Name") & ">...

This line cannot work in this format:
Response.Write("<Input Type='CheckBox' Name='ITitle' Value='" &
rsData("Name") & "' />")

or

<Input Type='CheckBox' Name='ITitle' Value='<%=rsData("Name")%>' />


: <% 'Response.Write Request.Form("ITitle") %>
:
: I have some code that verifies if 5 titles are checked (howManyChecked),
: then I send this list of 5 titles to the next area. Problem is I am asking
: for the "Name" from the database, and the name contains spaces. When I go
to
: generate the list on the next area I get only the first Word, if there is
a
: space in the "Name" the collection takes this as the end of the Name data,
: and goes onto the next Name, taking only the first word again.
:
: I can get around the issue by changing it to the ID being transferred in
the
: ITitle, and then calling database to collect the data (Name) again. This
: seems an unnecessary step. Any ideas how I can drop the problem of losing
: data after the spaces?

HTH...

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top