On 21.01.2011 05:02, BobH wrote:
I have a simple file that should change the background color of a text
box on a form when the 'Edit' button is clicked.  For some reason I
can't get it to work.

If you want to see the changed background color, you'll need to prevent the form from being submitted when you click the "Edit" button:

  <button ... onclick="return setEdit()">Edit</button>

  function setEdit() {
     f2.style.backgroundColor = "#FF0000";
     return false;
  }

HTH,
stefan

--
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to