Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do i disable Form Elements

Status
Not open for further replies.

Gill1978

Programmer
Jun 12, 2001
277
GB
Hi!

On loading a form, i'm trying to disable a few text boxes and combo boxes.

I'm using the following javascript:

function disableStuff(f){
f.SectionNumber.disabled = true
}
or
function disableStuff(f){
f.SectionNumber.readonly = "yes"
}

which is run from:
<body onload=&quot;init(); disableStuff(f)&quot;>

I get the following javascript error:
SectionNumber is not an object

Can anyone tell me how i can disable these elements??

Thanks
Julie
 
Check that sectionNumber is named in the form and the spelling AND *case* are exactly the same.

Kola
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top