IE5.5 and javascript

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

 Date:  Wed, 9 Aug 2000 11:37:24 +0100
 To:  hwg-techniques(at)hwg.org
  todo: View Thread, Original
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

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.