Advertisement

01.09.2008 at 02:32PM PST, ID: 23071129
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.8

ASP Split Function

Asked by COTG in Active Server Pages (ASP), Miscellaneous Web Development, VB Script

Tags:

I'm having trouble when retrieving saved data from my database.  I can get the information there fine, it all saves the way I need it to.  But when it comes back from the database on the page reload, "phantom spaces are being added.  All relevant code is below.

All the data is fine in the output section, but for some reason when it comes back into the page, there's a space being added before the fields.  Every time, a new space is added.Start Free Trial
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:
<table cellpadding='0' cellspacing='0' border="0">
						<%							
							dim arrSplitModel, arrSplitDesc, i
							arrSplitModel = Split("" & rstDBEdit.Fields("model_input"), ",")
							ReDim Preserve arrSplitModel(13)
							arrSplitDesc = Split("" & rstDBEdit.Fields("desc_input"), ",")
							ReDim Preserve arrSplitDesc(13)
							for i = LBound(arrSplitModel) to UBound(arrSplitModel)
						%>
							<tr>
								<td><input class='special' type='text' name='strModel' value='<%=arrSplitModel(i)%>' style='padding-left: 5px; solid #cbcbcb; border-bottom: 1px solid #aaaaaa;' maxlength='12' /></td>
								<td><input class='special' type="text" name='strDesc' value='<%=arrSplitDesc(i)%>' style='padding-left: 5px; border-bottom: 1px solid #aaaaaa;' maxlength='12' /></td>
							</tr>
						<%	
							Next
						%>			
						</table>
					</td>
					<td>
						<table cellpadding='0' cellspacing='0' border="0">
							<% dim mStr
							   mStr = 0
							   Do Until mStr = 14
							%>							
							<tr>
								<td><input type='text' size='57' readonly style="border-bottom: 1px solid #aaaaaa;" /></td>
							</tr>
							<% mStr = mStr + 1
								Loop
							%>
						</table>
 
database update contains:
 
& "model_input = '" & CStr(UCase(Trim(Request.Form("strModel")))) & "', " _
& "desc_input = '" & CStr(UCase(Trim(Request.Form("strDesc")))) & "', " _
 
 
And then when I view the output, I use:
 
dim text
response.Write "<table border='1' width='15%'>"
for each text in Split(Request("strModel"), ",")
	response.Write "<tr><td>" & text & "</td></tr>"	
	response.Write Trim(text)
next
response.Write "</table>"
 
dim desc
response.Write "<table border='1' width='15%'>"
for each desc in Split(Request("strDesc"), ",")
	response.Write "<tr><td>" & desc & "</td></tr>"
	response.Write Trim(desc)
next
response.Write "</table>"
[+][-]01.09.2008 at 03:50PM PST, ID: 20623710

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Active Server Pages (ASP), Miscellaneous Web Development, VB Script
Tags: ASP, VBScript
Sign Up Now!
Solution Provided By: The_Big_Daddy
Participating Experts: 1
Solution Grade: A
 
 
[+][-]01.10.2008 at 06:36AM PST, ID: 20627356

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_2_20070628