Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   Using Post but losing data due to spaces??? (http://www.velocityreviews.com/forums/t793889-using-post-but-losing-data-due-to-spaces.html)

Drifter 04-08-2004 02:46 PM

Using Post but losing data due to spaces???
 
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,'Inserv ice');"">")

<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



Roland Hall 04-09-2004 10:25 AM

Re: Using Post but losing data due to spaces???
 
"Drifter" wrote in message
news:c53oj4$s8r$1@nntp-stjh-01-01.rogers.nf.net...

: <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



Drifter 04-09-2004 03:09 PM

Re: Using Post but losing data due to spaces???
 
Hehhe - oh yah - 'quotes'. That did the trick.

Thanks,

D

"Peter Foti" <peter@Idontwantnostinkingemailfromyou.com> wrote in message
news:107aq1p380t4ha5@corp.supernews.com...
> "Drifter" <loreseeker_prime@hotmail*removethis*.com> wrote in message
> news:c53oj4$s8r$1@nntp-stjh-01-01.rogers.nf.net...
> > 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,'Inserv ice');"">")
> >
> > <Input Type='CheckBox' Name='ITitle' Value=" & rsData("Name") & ">...

>
> You need quotes around your Value attribute.
> <Input Type='CheckBox' Name='ITitle' Value='" & rsData("Name") & "'>...
>
> Regards,
> Peter Foti
>
>
>





All times are GMT. The time now is 11:29 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57