title: how to : change css class of a button in a parent window with javascript or jquery?
body: <p>I am trying to change the class of a button in a parent window from a popup.  I can change the display but the change in class does not seem to take effect.  What is wrong with this code that run in the popup?  The change to innerHTML and display works but not the className.</p>
  
  <pre><code>   var messages = window.opener.document.getElementById("messages");
     messages.innerHTML="Now linked to Facebook page at "+  link + ".";
  
     var firstmessage = window.opener.document.getElementById("firstmessage");
     firstmessage.style.display = 'block';
     firstmessage.style.className += ' notice_msg ';
  
     var choosefanpagebtn = window.opener.document.getElementById("choosefanpagebtn");
     choosefanpagebtn.style.className = "";
     choosefanpagebtn.style.className = "green_button";
  </code></pre>
  
  <p>Thank you.</p>