Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBSCRIPT runtime error '800a000d' Type mismatch: 'SELECTED'

Status
Not open for further replies.

xWastedMindx

Technical User
Sep 3, 2002
67
US
Im trying to make a selection box, with two options and its giving me the error in the subject line.

VBSCRIPT Runtime Error '800a000d' Type Mismatch: 'SELECTED'/filepath here

Below is the section of code that is causing the problem. Im not sure what it is.. and also, down at the bottom, there is suppose to be a Submit button, but I cant seem to get it working. Thanks if anyone can help.

<font face=&quot;Arial&quot; size=&quot;2&quot; color=&quot;darkgreen&quot;>
<p><b>Payment Information:</b></font>
<font face=&quot;Courier&quot; size=&quot;2&quot;>
<br><b>type of credit card:</b>
<select name=&quot;cctype&quot;>
<option value=&quot;1&quot;>
<%=SELECTED( cctype, &quot;1&quot; )%> >VISA
<option value=&quot;2&quot;>
<%=SELECTED( cctype, &quot;2&quot; )%> > Mastercard
</select>
<br><b>credit card number:</b>
<input name=&quot;ccnumber&quot; size=&quot;20&quot; maxlength=&quot;20&quot; value=&quot;<%=Server.HTMLEncode( ccnumber )%>&quot;>
<br><b>credit card expires:</b>
<input name=&quot;ccexpires&quot; size=&quot;20&quot; maxlength=&quot;20&quot; value=&quot;<%=Server.HTMLEncode( ccexpires )%>&quot;>
<br><b>name on credit card:</b>
<input name=&quot;ccname&quot; size=&quot;20&quot; maxlength=&quot;20&quot; value=&quot;<%=Server.HTMLEncode( ccname )%>&quot;>
<input type=&quot;submit&quot; value=&quot;Register&quot;>
 
[tt]

The button looks fine, the error might have something to do with an array you're trying to use (if you are)




<input type=&quot;submit&quot; value=&quot;Submit Proposal&quot; name=&quot;submit&quot;>
[tt]
&quot;Beware of the most dangerous person in business - the articulate incompetent.&quot;
[/tt]

banana.gif
rockband.gif
banana.gif

 
Ok, this is a long shot cos i cant quite follow your coding here but
<%=Server.HTMLEncode( ccnumber )%>
I would say should be written
<%=Server.HTMLEncode(&quot;ccnumber&quot;)%>
and so forth Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
try this:

<select name=&quot;cctype&quot;>
<option selected value=&quot;1&quot;>
<%=(cctype, &quot;1&quot; )%> >VISA
<option value=&quot;2&quot;>
<%=(cctype, &quot;2&quot; )%> > Mastercard
</select>

looks like you had selected in the wrong spot. when it was seeing the command to display it...it was interpreting that as a path and so it was confused.
&quot;Where's the Ka-Boom? There's supposed to be an Earth-shattering Ka-Boom!&quot;
Marvin the Martian
 
Hithere, I tryed what you said, but now all I get is an '800a03ee' error.

Expected ')'
Response.Write((cctype, &quot;1&quot;))
----------------------^

Thats what its giving me now..If you want I will post the whole page of code, All im trying to do is get this CC selection thing to work. This isnt even my code, its coming right out of a book that Im teaching myself with. (And its a book error, not mine)
&quot;SAMS Teach Yourself ASP in 21 Days&quot; It's time to kick ass and chew bubblegum, but I'm all out of gum --Duke Nukem
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top