COLDASBEER
10-14-2003, 01:24 PM
I have an input box in my form and basically what I want is when someone enters "hi" into it a message displays below it.
any ideas?
any ideas?
|
Click to See Complete Forum and Search --> : input box COLDASBEER 10-14-2003, 01:24 PM I have an input box in my form and basically what I want is when someone enters "hi" into it a message displays below it. any ideas? Charles 10-14-2003, 02:13 PM <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="Content-Script-Type" content="text/javascript"> <title>Example</title> <input type="text" onchange="if (/^\s*hi\s*$/i.test(this.value) && document.getElementById) document.getElementById('foo').firstChild.data = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.'"> <p id="foo">&nbsp;</p> COLDASBEER 10-14-2003, 06:46 PM Thanks that's great but what if I have more than one input that need sthe same result; If HI or AK is entered into the text box displays this message.. Thanks Charles 10-15-2003, 06:38 AM <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="Content-Script-Type" content="text/javascript"> <title>Example</title> <input type="text" onchange="if (/^\s*(hi)|(ak)\s*$/i.test(this.value) && document.getElementById) document.getElementById('foo').firstChild.data = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.'"> <p id="foo">&nbsp;</p> webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |