RE: multiline textbox word limit PART 2

by Rob Prentice <RJP(at)clickdms.com>

 Date:  Wed, 26 Jul 2000 12:13:52 +0100
 To:  "'Peter-Paul Koch'" <gassinaumasis(at)hotmail.com>,
"Hwg-Techniques (E-mail)" <hwg-techniques(at)hwg.org>
  todo: View Thread, Original
didnt work. its saying in the consol thing in NN that register is not
defined.
im useless at javascript. im not getting very far:(


-----Original Message-----
From: Peter-Paul Koch [mailto:gassinaumasis(at)hotmail.com]
Sent: 26 July 2000 11:55
To: RJP(at)clickdms.com; hwg-techniques(at)mail.hwg.org
Subject: Re: multiline textbox word limit PART 2


>so.... there in somthing in the above code somewhere
>that netscape dislikes enough so it wont work, but doesnt dislike it
>enough to complain about it.

To see the complaints, type 'javascript:' in the location bar. I realize
the 
error now: you don't return true anywhere. When returning a value,
Netscape 
insists that all branches of the function return something. The branch
where 
temp.length is not larger than maxwords doesn't return anything. So do

if (temp.length>maxwords){
etc.
}
else return true;

That should do the trick.

ppk
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.