Do I need a client-side script to accomplish this? Could someone 
please help?
--- In [email protected], "swatpup32" 
<[EMAIL PROTECTED]> wrote:
> Well I have gotten to the point that I can take a string of numbers 
> convert it to checkboxes and then take the altered checkboxes and 
put 
> the values back into a string. Now what I'm having a problem with 
is 
> sending the string to database.
> 
> <!=============== Check for Value in array Function ===============!
>
> <% Function ElementInArray(aMyArray, strLookingFor, compare)
>   ElementInArray = (UBound(Filter(aMyArray, strLookingFor, True, 
> compare)) > -1)
> End Function %>
> 
> <!================= Convert String to Checkboxes ==================!
>
> strDiscOwned = "1,3,6,8,12,16,17,18,20" 'usually a database field
> arrDiscOwned = split(strDiscOwned,",")
> strDiscInSeries = 20 'usually a database field
> For i=1 to strDiscInSeries
> HaveIt=ElementInArray(arrDiscOwned,i,compare)%>
> <input type="checkbox" name="HaveDisc" value="<%=i%>" <%
> if HaveIt=true then 
> response.write "checked"
> end if %>/>
> <% 'create rows of ten
> if i mod 10=0 then 
> response.write "<BR>"
> End If
> Next
> %>
> 
> <!================= Convert Checkboxes to String ==================!
>
> strNewString=request.form("HaveDisc")
> strNewString=replace(strNewString,chr(32),"")'remove spaces
> strOwnedDisc=request.form("HaveDisc").count 'Number of disc I have
> <!================= ============================ ==================!
>
> 
> Now here's my dilema how do I take strNewString and send it to the 
> database. I tryed assigning it's value to a hidden input field and 
> then added it the "record update" behavior, but it didn't work. My 
> Guess is it's because the request.form function does not occur till 
> after the rest of the form is submited to the database.
> 
> Is There anyway to submit this value to the database?
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --- In [email protected], "swatpup32" 
> <[EMAIL PROTECTED]> wrote:
> > <form name="completion" id="form1" method="post" action="">
> > <% 
> > Dim strNumbers, arrNumbers, numCheckValue, NumToValue, i, M
> > strNumbers = "1,3,6,8,12,16,17,20" 'Typically this would be a 
> string 
> > from the database
> > arrNumbers = split(strNumbers,",")
> > NumToValue = rsAnime.Fields.Item("intDiscInSeries").Value
> > For i=1 to NumToValue
> > M=ElementInArray(arrNumbers,i,compare)%>
> > <input type="checkbox" name="HaveDisc" value="<%=i%>" <%if M=true 
> > then response.write "checked="& chr(34) & i & chr(34)  end if %>/>
> >     <%if i mod 10=0 then
> >     response.write "<BR>"
> > End If
> > Next
> > %>
> > </Form>
> > Now at this point two have rows of checkboxes, which values are 
> > determined by the comma-delimited string in the database. Now 
here 
> is 
> > where I'm having the problem. How do i take checkbox's value= for 
> the 
> > checkboxes that are checked and rejoin them into comma-delimited 
> > string and then send it off to the database.
> > 
> > I'm guessing that if I create a hidden input type in the form. I 
> can 
> > put the string as the value and update the "update record" server 
> > behavior in Dreamweaver, but I'm not sure.
> > 
> > Is it possible to do this without creating two pages?




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to