![]() |
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 |
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 |
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.