Sorry mate but that says: Microsoft VBScript compilation error '800a0408' Invalid character /lvilicences/appDetails.asp, line 541 { ^ i think because the stuff in the <% tags is vbscript and curly brackets is part of javascript. I have re-written it now so it just uses javascript, although its still bugging me as to why it didnt work my way!!!!! Thanks for trying anywayz!! ____________________________________ 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:25 To: sem-comp@xxxxxxxxxxxxx Subject: [sem-comp] Re: Plebby question but its pissing me off! try: if len(request.form("dtmcomments")) > 250 then { %> alert("too long ya bugger!"); return(false); <% } else { %> alert("Comments fine ya bugger!"); return(false); <%} --- "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.