PDA

View Full Version : vbscript error


boni99
03-30-03, 17:10
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.

Ixalmida
04-01-03, 11:18
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.