Re: IE5.5 and javascript

by "Rossi Designs" <webmaster(at)rossidesigns.net>

 Date:  Wed, 9 Aug 2000 09:24:20 -0400
 To:  "Rob Prentice" <RJP(at)clickdms.com>,
<hwg-techniques(at)hwg.org>
 References:  DMS
  todo: View Thread, Original
<script>
<!--
function maxwordcount(cur){
var maxwords=100
if (document.images){
var temp=cur.split(" ")
if (temp.length>maxwords){
alert("Sorry, but you have exceeded the 100 word limit. Please reduce
the length of your company description. Thank you.")
return false
}
}
}
//-->
</script>

where do you get 'words' anyway? The other browsers are letting you treat
'cur' as if it were an object and add a method to it. IF 'cur' is a string
you should be able to split it without adding things to it. I haven't tested
that but it should work.

Data Driven Design
P.O. Box 1084
Holly Hill, FL 32125-1084
Phone : (904) - 226-8979
URL : http://www.datadrivendesign.com
URL : http://www.rossidesigns.net
----- Original Message -----
From: "Rob Prentice" <RJP(at)clickdms.com>
To: <hwg-techniques(at)hwg.org>
Sent: Wednesday, August 09, 2000 6:37 AM
Subject: IE5.5 and javascript


> Hello,
>  Ive got a javascript that works fine, until you run it in IE 5.5. it
> says that 'words.value' is null. not a value or an object.
>
> but no other browser seems to mind it. well... netscape 4.6/7 and IE 4
> and 5.
>
> it counds the words (sperated by a space ' ') and its called by an
> onBlur attached to a multiline text box. if the word count (or space
> count) is above 100 it lets you know. if the word count is less than 100
> it lets you carry on with no hassles.
>
> the scrip is as below...
>
>
>
> <script>
> <!--
> function maxwordcount(cur){
> var maxwords=100
> if (document.images){
> var temp=cur.words.value.split(" ")
> if (temp.length>maxwords){
> alert("Sorry, but you have exceeded the 100 word limit. Please reduce
> the length of your company description. Thank you.")
> return false
> }
> }
> }
> //-->
> </script>
>
>
> anyone able to help?
> thankyou,
> take care,
>  Rob.
>
>

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