PDA

Click to See Complete Forum and Search --> : 2 part -- dynamic or not ?!?


rigpig
Dec 19th, 2000, 04:27 PM
K as it stands right now the page is kinda working -- i finally got values to populate into text fields. Now I do not know however how to generate the values for the drop downs ie.number of doors can range from 2-5. Right now, they are in an "option list". How do you get the value of the dropdown to load correctly in the list for editing purposes?

Secondly I have over 60 checkboxes to add to the page is it best to do it the way I have which is the following

<%If Not(rsOptions1.EOF AND rsOptions.BOF) Then rsOptions.MoveFirst
numincol = rsOptions1.recordcount \3+1
Do Until rsOptions1.EOF%>
<td valign="top">
<%for i = 1 to numincol
If rsOptions1.EOF Then Exit For%>
<input type="checkbox" name="<%=rsOptions1.Fields("Description")%>" value="<%=rsOptions1.Fields("ID")%>">
<%=rsOptions1.Fields("Description")%><br>
<%rsOptions1.MoveNext
Next%>
</td><%Loop%>


This generates an error
Microsoft VBScript runtime error '800a01a8'
Object required: ''
/admin/test.asp, line 544
what do i do to rectify this problem?
... or should i just write the code out for each individual checkbox?

Mark Sreeves
Dec 21st, 2000, 07:50 AM
Firstly, it's better to post 2 seperate questions otherwise you'll scare everyone off! :)

which line is "line 544"?

Do any of the text boxes get written out to the page?

<%If Not(rsOptions1.EOF AND rsOptions.BOF) Then rsOptions.MoveFirst

shouldn't this be

<%If Not(rsOptions1.EOF AND rsOptions1.BOF) Then rsOptions1.MoveFirst

it all seems more complicated than necessary...

StevenH
Jul 19th, 2001, 05:54 PM
I have encountered a problem with a checkbox using vbscript. I am tryning to do this:

sub chkCheck1_Onclick

if chkCheck.checked = true then
alert("test")
else
alert("Does not work")
end if

It seems that it does not even go into the check box click? Anyone explain this to me and appreicate if there is work around for this?