that whole bit of code is in <SCRIPT LANGUAGE=javascript> tags before the html page. so to make it easy i should wirte it all in javascript, but because i am crap at javascript i tend to slap in some vbscript using asp tags and it normally seems to work!!!! ____________________________________ Donna Crowden MAFF - ITD (A) B Room A911, Guild HQ GTN. 1453 Ext. 3450 Tel: 01483 403450 ____________________________________ -----Original Message----- From: Conal Wright-Newton [mailto:conal_lab24@xxxxxxxxx] Sent: 15 August 2001 11:26 To: sem-comp@xxxxxxxxxxxxx Subject: [sem-comp] Re: Plebby question but its pissing me off! I forgot to say... the open and close asp container tags were opened and closed before the {} That will probably cause a problem Conal --- "Crowden, Donna (ITD)" <Donna.Crowden@xxxxxxxxxxxxxxxx> wrote: > > Hello all, > > please can someone help me coz its pissing me > off!!!!!!! > > I am trying to valudate a text area to make sure > that the person dosent type > more than 250 chars into it. > this is the code i have been playing with (although > the else bit will be > return("true") int he long run!) > it is a mixture of vbscript and javascript using asp > (as we need to do > validation in javascript) > > <%if len(request.form("dtmcomments")) > 250 then%> > > { > alert("Comments too long ya bugger!"); > return(false); > } > <%else%> > { > alert("Comments fine ya bugger!"); > return(false); > } > <%end if%> > > to me this says that if i type in less then 250 > chars it should return the > second comment or if i type more than 250 chars it > will return the first > comment. > However it ALWAYS returns the second comment! > > Please can someone tell me WHY!!!!!! > > > (sorry to be such a pleb!) > > > ____________________________________ > > Donna Crowden > DEFRA - ITD (A) B > Room A911, Guild HQ > GTN. 1453 Ext. 3450 > Tel: 01483 403450 > ____________________________________ > > > > > ____________________________________________________________ Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie This email has been scanned for viruses by the MessageLabs SkyScan service which is being trialed by the GSI 10th August 2001 to 21st September 2001. For further details, please see ttp://www.gsi.gov.uk/main/gncnotices/gncinformationnotice5_2001virusscanning .pdf In case of problems, please call your organisations IT helpdesk.