Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

submit??

Status
Not open for further replies.

dakoz

Programmer
Feb 2, 2002
74
hi all,

i have the following i have a form which take dynamically data from a database, i can see that i have retrieved everything correctly, but i submit the form all field having a space ie "Store Type" sends only Store

can i fix this problem??

here is some sample code i use :


<form action=&quot;left.asp&quot; method=&quot;post&quot; id=&quot;form1&quot; name=&quot;form1&quot; target=&quot;iframe&quot;>
<table align=center valign=top>
<tr>

<b>Cube Name: </b><br>


<SELECT class=price id=&quot;strCubeName&quot; name=&quot;strCubeName&quot; onchange=&quot;document.form1.submit();&quot;>
<%
For Each cube in cat.CubeDefs
IF cube.Name=Request.Form(&quot;strCubeName&quot;) THEN
Response.Write &quot;<option selected>&quot; & cube.Name & &quot;</OPTION>&quot;
ELSE
Response.Write &quot;<option>&quot; & cube.Name
END IF
Next
%>
</select>

</td>

</tr>
</table>
</form>



<BR><BR>

<TABLE WIDTH=100% ALIGN=CENTER cellpadding=0 cellspacing=0>
<TR><TD align=center valign=middle>


<FORM name=&quot;olapselect&quot; target=&quot;main&quot; method=&quot;post&quot; action=&quot;main_sql1.asp&quot;>
<TABLE border=0>
<TBODY>
<TR>
<TD>
<TABLE>
<TR><TD align=left>DIMENSIONS</TD></TR>
<TR>
<TD>
<SELECT class=price size=15 multiple name=list1>
<%
IF Session(&quot;CubeName&quot;)<>&quot;&quot; THEN
For di = 0 To cdf.Dimensions.Count - 1
Response.Write &quot;<option value=&quot;& cdf.Dimensions(di).Name &&quot;>&quot;& cdf.Dimensions(di).Name &&quot;</option>&quot;
IF cdf.Dimensions(di).Name=Request.form(&quot;dimension&quot;) then
hi=di
END IF
NEXT
Response.Write &quot;Members : &quot;& cdf.Dimensions(0).Hierarchies(0).Levels(0).Members.Count
END IF
%>
</SELECT>
</TD>
</TR>
</TABLE>
</TD>

<TD>
<TABLE>
<TR>
<TD vAlign=center align=middle>
<INPUT onclick=moveSelectedOptions(this.form.list1,this.form.list2,true,this.form.movepattern1.value) type=button value=&quot;>>&quot; name=rightrows><BR>
<INPUT onclick=moveSelectedOptions(this.form.list2,this.form.list1,true,this.form.movepattern1.value) type=button value=&quot;<<&quot; name=leftcols><BR>
</TD>
<TD>
<TABLE>
<TR><TD>ROWS</TD></TR>
<TR>
<TD>
<SELECT class=price size=7 multiple name=list2></SELECT>
</TD>
</TR>
</TABLE>
</TD>
<TR>
<TD vAlign=center align=middle>
<INPUT onclick=moveSelectedOptions(this.form.list1,this.form.list3,true,this.form.movepattern1.value) type=button value=&quot;>>&quot; name=rightcols><BR>
<INPUT onclick=moveSelectedOptions(this.form.list3,this.form.list1,true,this.form.movepattern1.value) type=button value=&quot;<<&quot; name=leftcols><BR>
</TD>
<TD>
<TABLE>
<TR><TD>COLUMNS</TD></TR>
<TR>
<TD>
<SELECT class=price size=7 multiple name=list3></SELECT>
</TD>
</TR>
</TABLE>
</TD></TR>
</TABLE>
</TD>
<TR><TD>
Show Empty Rows<INPUT TYPE=&quot;CHECKBOX&quot; NAME=&quot;emptyrows&quot;>

<TR>
<INPUT name=movepattern1 TYPE=HIDDEN>
</TD></TR>
<TR><TD><input type=&quot;submit&quot; value=&quot;ShowCube&quot; id=&quot;query&quot; name=&quot;query&quot; onclick=&quot;selAll(true)&quot;></FORM></TD></TR></TBODY></TABLE>

</TD></TR></TABLE>
</TD><TD height=100% BACKGROUND=&quot;dot.gif&quot;><IMG SRC=&quot;spacer.gif&quot; width=6></TD></TR></TABLE>
</TABLE>


</BODY>
</HTML>
 
I'm missing a value for the options:

<SELECT class=price id=&quot;strCubeName&quot; name=&quot;strCubeName&quot; onchange=&quot;document.form1.submit();&quot;>
<%
For Each cube in cat.CubeDefs
IF cube.Name=Request.Form(&quot;strCubeName&quot;) THEN
Response.Write &quot;<option selected value='&quot; & cube.Name & &quot;'>&quot; & cube.Name & &quot;</OPTION>&quot;
ELSE
Response.Write &quot;<option value='&quot; & cube.Name & &quot;'>&quot; & cube.Name
END IF

Next
%>
</select>

Quasibobo

Don't eat yellow snow!
 
Instead of this (which produces HTML code which omits the double quotes):
Response.Write &quot;<option value=&quot;& cdf.Dimensions(di).Name &&quot;>&quot;& cdf.Dimensions(di).Name &&quot;</option>&quot;

How about this:
Response.Write &quot;<option value=&quot; & Chr(34) & cdf.Dimensions(di).Name &&quot;>&quot; & cdf.Dimensions(di).Name & Chr(34) & &quot;</option>&quot;

Best regards,
J. Paul Schmidt - Freelance ASP Web Developer
- Creating &quot;dynamic&quot; Web pages that read and write from databases...
 
Also the following forum is pretty good for ASP questions:

forum333

Best regards,
J. Paul Schmidt - Freelance ASP Web Developer
- Creating &quot;dynamic&quot; Web pages that read and write from databases...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top