Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

readonly field

 
shan Iyer
Ranch Hand
Posts: 391
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Niki Nono
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try

.raedOnly = true

case sensitive.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Niki,
You fat fingered your line:

It should be:
.readOnly = true;

Eric
 
Niki Nono
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 391
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx!!
It is "readOnly" case-sensitive!!!
Wasted half a workday on such a silly thing!!!

thanx,
Shankar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic