Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] maxLength question
- From: decren at yahoo.com (DeWayne Crenshaw)
- Subject: [Javascript] maxLength question
- Date: Sat May 19 07:13:44 2007
Hello,
I am having a problem in establishing maxLength of a
textBox depending on which radioButton is checked. It
seems that IE only establishes maxLength when a page
loads and does not allow you to change it once the
page has loaded.
Although I've tried a lot of manipulations, my rough
code is as follows,
function changeLength()
{
if (document.myForm.radioButton[1].checked) {maxLength
=5}
else {maxLength =6}
}
<INPUT TYPE=TEXT NAME="textBox" id="textBox"
onfocus="changeLength()">
I'm looking for something that will work cross-browser
and would appreciate any pointers.
____________________________________________________________________________________Luggage? GPS? Comic books?
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz
- Follow-Ups:
- [Javascript] maxLength question
- From: Edwin Martin
- [Javascript] maxLength question
- Prev by Date: [Javascript] While statement array losing data
- Next by Date: [Javascript] maxLength question
- Previous by thread: [Javascript] While statement array losing data
- Next by thread: [Javascript] maxLength question
- Index(es):