[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Debconf-team] Penta save button fix

On Sat, Jun 18, 2011 at 4:46 PM, Moray Allan <moray@sermisy.org> wrote:
> new Form.Observer('content_form', 2, function(element, value ) {
> enable_save_button() } );

Gunnar tried this, but found that when put directly into the penta
code it's making the save button be *always* shown -- an event is (for
whatever reason) being generated when the page is first loaded.  So
presumably we want to delay the listening until after that.  I'm not
sure what is triggering the event, and therefore not sure how long we
need to delay, but the first thing to try would be something like

window.addEventListener('load', function() {
  new Form.Observer('content_form', 1, function(element, value ) {
               enable_save_button() } );
}, false);

If anyone reading actually knows about Javascript, please give a
better suggestion!


Reply to: