Type mismatch

Results 1 to 2 of 2

Thread: Type mismatch

  1. #1
    Join Date
    Dec 1969

    Default Type mismatch

    Hi...<BR><BR>Im new on ASP and Im having problems with the following error<BR><BR>Types doesn&#039;t match: GetType, Line 146<BR><BR>My code<BR><BR>sub GetType<BR> i = 0<BR> do while(i&#060;=forma.rdgAdsType.length)<BR> <BR> if i=1 then<BR> response.write("checked=true")<BR> break<BR> end if<BR> i= i+1<BR> loop<BR>end sub<BR><BR>the error line<BR><BR>&#060;input type="radio" name="rdgAdsType" value="Banner" &#060;% GetType %&#062;&#062;<BR><BR>TIA<BR>Julio

  2. #2
    Join Date
    Dec 1969

    Default You are mixing ASP and client script

    You can&#039;t use <BR> forma.rdgAdsType<BR>on the server. Period.<BR><BR>Not that your code would make sense even if you could. Why would you loop through, just to *ALWAYS* end up writing out "checked=true"???<BR><BR>Every time you call GetType, no matter what, you loop through all the fields and then ALWAYS (when i=1) write that out.<BR><BR>But as I said, the code is more bogus than that, because you are trying to access a client-side object (the collection of radio buttons named "forma.rdgAdsType") from server-side code.<BR><BR>And WHY is this in the REGULAR EXPRESSIONS forum??? <BR><BR>You don&#039;t have anything even resembling a regexp in there.<BR><BR>Oh...just realized: Is this ASP.NET code?<BR><BR>

Posting Permissions

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