Loading ...
Sorry, an error occurred while loading the content.

37062Re: [ydn-javascript] Re: Extra button in a dialog

Expand Messages
  • Todd Kloots
    Sep 2, 2008
    • 0 Attachment
      Hi Christian -

      I'm the author of the Button widget and was wondering if you could
      provide me with more information about what specific interaction you
      were going for originally before you solved the problem using the
      <button> element. Where you originally working with <input
      type="submit"> instead of <button> because you wanted the form to work
      with and without javascript? The more info you can provide the better.
      If there is a bug or problem with the Button widget I'd like to know so
      that I can address it in a future release of YUI.

      Thanks,
      Todd

      Christian Tiberg wrote:
      > Replacing the stupid thing with a <button> instead of <input
      > type="submit"> works. Had to read the button.js file, though - not
      > easy to find.
      >
      > Best regards,
      > Christian Tiberg
      >
      >
      > 2008/8/27 Christian Tiberg <ctiberg@... <mailto:ctiberg@...>>
      >
      > Hello!
      >
      > I have an extra button in my customer form, to copy postal address
      > to shipping address. This all worked well until I made that button
      > a YUI button, using the following:
      >
      > new
      > YAHOO.widget.Button(document.endrakundform.kopieralev).on("click",
      > function(e) {
      > kopieraLevAdr(document.endrakundform);
      > YAHOO.util.Event.stopEvent(e);
      > });
      >
      > As you can see, I've tried stopEvent, but that doesn't seem to
      > work. I've got alert() statements in the kopieraLevAdr method, but
      > these are executed *after* the form is submitted, so the stopEvent
      > doesn't get called until after that either.
      >
      > Is there any way to fix this? Other than to revert to a standard
      > button, which actually worked? For the standard button I had the
      > onclick="xxx" in the HTML itself, maybe that's the difference?
      >
      > Best regards,
      > Christian Tiberg
      >
      >
      >
    • Show all 3 messages in this topic