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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable field comes back undefined!!!! help?

Status
Not open for further replies.

ahmun

IS-IT--Management
Jan 7, 2002
432
US
I am having trouble with some javascript in my ASP page...

As per many posts in this forum, I have found very useful tips on how to disable a form field with the syntax:
Code:
document.formname.field.disabled=true;

But I ran a test and I can't seem to get this working for a listbox.

here's the code:
Code:
function EnableDisableTenderType(frmObject)
{
  [gray]//document.intTenderTypeID.disabled = !frmObject.checked;[/gray]
  alert(document.frmContactDetail.intTenderTypeID.disabled);
}
.
.
.[gray]in the onClick procedure of a checkbox I have:[/gray]
onClick="EnableDisableTenderType(this);"

The resulting alert box returns "undfined" as the value... is there something I'm doing wrong?

Earnie Eng
 
hm... it must have been a page cache problem... I closed my browser and re-logged on to my page and things seemed to work.

silly IE...

Thanks for reading this post.

Earnie Eng
 
Normally you don't have to close IE to clear a problem like that, just hold down the CTRL key while you click the Refresh button. (In Firefox I believe it's SHIFT instead of CTRL).


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top