PDA

View Full Version : Inline AutoComplete question


MAXX
02-28-2003, 12:14 PM
Hello folks ...

I have a problem with inline auto copmplete.
well I have a few HTML pages where I don't want to use auto-complete function. Is there any way/setting to disable that option?? Maybe with CSS code or JavaScript or some other option that can be include in html page.

Quick question No2:
if I use "textarea" field, is there any way to limit the input??
Like maxlength = "15". Now I use the JavaScript to control the number of input characters.

Have a nice day & thanx in advance for helping me out
MAXX

redhead
02-28-2003, 12:17 PM
well... the auto complete thing is controlled by the user... so its not something that can be disabled as far as i know...

as for limiting a textarea... check out whammys script:

http://www.codingforums.com/showthread.php?threadid=2224

meow
02-28-2003, 01:02 PM
Actually (I mean of course) Microsoft provides an attribute for that too ... *sigh*

I don't remember but it's something like autocomplete="off". Search msdn if that doesn't work.

MAXX
02-28-2003, 01:48 PM
thanx for helping :)

about autocomplete="off" will try to search ...

and for limiting textarea here is JS that I use:

<script language="JavaScript">
<!--
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit)
field.value = field.value.substring(0, maxlimit);
else
countfield.value = maxlimit - field.value.length;
}
//-->
</script>

then you define value:
<input readonly type=text name=remLen size=4 maxlength=4 value="2000">

and use it :)
<textarea rows="10" name="S1" cols="50" wrap="physical" onKeyDown="textCounter(this.form.S1,this.form.remLen,2000);" onKeyUp="textCounter(this.form.S1,this.form.remLen,2000);" onFocus="textCounter(this.form.S1,this.form.remLen,2000);"></textarea>


maxx

MAXX
02-28-2003, 01:59 PM
AUTOCOMPLETE="off" is the right way to do it :)

thanx

redhead
02-28-2003, 05:23 PM
Originally posted by meow
Actually (I mean of course) Microsoft provides an attribute for that too ... *sigh*bah... i should have guessed that :rolleyes: sorry 'bout that ;)