Disabling buttons.

Results 1 to 2 of 2

Thread: Disabling buttons.

  1. #1
    Join Date
    Dec 1969

    Default Disabling buttons.

    I have a form with a table in it. The table has a "Hot Link" in it that displays info about the record in fields below the table in a different frame.. I need to disable all of my buttons ( edit, delete, cancel, etc.) except the add if the table is empty. I can&#039;t seem to find any code for this. I assume it&#039;s -- If (form1.document.linkname == &#039;&#039;) {<BR> Something<BR> Something ??????<BR><BR>How can disable the buttons if the Hot Link field is empty??<BR><BR>Thanks in advance for any help.<BR>

  2. #2
    Arky Guest

    Default RE: Disabling buttons.

    You might want to try creating a global variable of <BR>var textfieldgood = 0;<BR><BR>when the user types something into the text field or until they add something you then change it to 1.<BR><BR>when you click on edit delete or any of the other buttons you simply check the value first so you say <BR><BR>onClick="my_function()"<BR><BR>function my_function()<BR>{<BR>if(textfieldgood &#062; 0)<BR> do all your stuff <BR>else;<BR>//else nothing<BR>}<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts