This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes HTML, CSS and JavaScript and the fly likes readonly field Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "readonly field" Watch "readonly field" New topic
Author

readonly field

shan Iyer
Ranch Hand

Joined: Jul 13, 2005
Posts: 391
Hi,

When I click a radio button , i want to make 2 fields readonly, after populating the fields.
BUT....doucument.<formname>.<propertyname>.raedonly=true; does not work!!!
I DONT want to disable the fields, but make it readonly.

My entire code is like this:::::::
function setToList(selected,popupName){
if (document.<formname>.radioButton[0].checked == true)
{

// populating field one
document.<formname>.<propertyname>.value = column[3];

//making field one readonly(does not work)
document.<formname>.<propertyname>.readonly=true;

// populating field two
document.<formname>.<propertyname>.value = column[4];

//making field two readonly(does not work)
document.<formname>.<propertyname>.readonly=true;
}
}

[ December 22, 2005: Message edited by: shankar Iyer ]
[ December 22, 2005: Message edited by: Bear Bibeault ]

Warm Regards, S.Iyer
SCJP1.4, SCWCD1.4
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
try

.raedOnly = true

case sensitive.


Life called,so here I am.<br />Cheers<br />Niki.:-)
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Niki,
You fat fingered your line:

It should be:
.readOnly = true;

Eric
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
ya i did that on purpose cuz i figured your server would recognize readOnly as some kind of special character and disallow it..

anyways now i know it allows it.
shan Iyer
Ranch Hand

Joined: Jul 13, 2005
Posts: 391
Thanx!!
It is "readOnly" case-sensitive!!!
Wasted half a workday on such a silly thing!!!

thanx,
Shankar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: readonly field