Results 1 to 3 of 3

Thread: 2 part -- dynamic or not ?!?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2000
    Posts
    29

    Question

    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?

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    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...
    Mark
    -------------------

  3. #3
    Lively Member
    Join Date
    Oct 2000
    Posts
    98

    Question VBSCRIPT - Checkbox

    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width