[sem-comp] Plebby question but its pissing me off!

  • From: "Crowden, Donna (ITD)" <Donna.Crowden@xxxxxxxxxxxxxxxx>
  • To: "'new group e'" <sem-comp@xxxxxxxxxxxxx>
  • Date: Wed, 15 Aug 2001 10:59:14 +0100

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
____________________________________





Other related posts: