Results 1 to 2 of 2

Thread: vbscript error

  1. #1
    Join Date
    Mar 2003
    Posts
    1

    Angry Unanswered: vbscript error

    i know this is rather elementary but i'm getting this object required error and its driving me crazy. its for a web-based form, user enters and then a page on the fly is created. this is the code

    finalflavor=george.elements(10).value
    name_flavor1=george.elements(10).name
    dim name_option(6)
    dim flavorOption(6)

    for j=0 to 6
    name_option(j)=george.flavor.options(j).text
    if george.flavor.value="a" then
    msgbox "Please choose a flavor."
    exit sub
    end if
    next

    the error occurs on the first line after the "for" statement. it says there is an object required. i know its something easy that i'm missing but i can't seem to get it.

  2. #2
    Join Date
    Dec 2002
    Posts
    11

    Object Required

    I think generally "Object Required" means that you are not using a property or method correctly. It looks to me like:

    george.flavor.options(j).text

    Should probably be:

    george.flavoroptions(j).text


    Of course, this little syntax error may only be a typo in your message and fixing it may not fix the problem if the property is mis-referenced. You may have to go deeper into your code for the answer.

Posting Permissions

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