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

RE: [ydn-javascript] Re: Default Button Problem

Expand Messages
  • Ron Rudman
    Thank you!!!! Closure is good. _____ From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of David Pinkowitz Sent: Monday,
    Message 1 of 9 , May 7, 2007
    • 0 Attachment
      Thank you!!!!  Closure is good.

      From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of David Pinkowitz
      Sent: Monday, May 07, 2007 10:33 AM
      To: ydn-javascript@yahoogroups.com
      Subject: [ydn-javascript] Re: Default Button Problem

      The error you are getting is a known error. See:

      http://sourceforge. net/tracker/ index.php?
      func=detail& aid=1706337& group_id= 165715&atid= 836476

      According to the bug report, it is scheduled to be fixed.

      --- In ydn-javascript@ yahoogroups. com, "Ron Rudman" <ron@...> wrote:
      > I tried what is suggested below but still cannot get this to work.
      > First, in http://www.helphost s.com/vme/ test1.htm, I used an
      <INPUT>, created
      > the button with type="submit" , and used preventDefault.
      > I also changed the postmethod in the form to "asynch".
      > The result is that when the submit button is clicked, the form
      submits PRIOR
      > to execution of the first line (alert) of my submit handler - before
      > execution of the preventDefault.
      > Also, hitting ENTER instead of clicking on the button still gives
      > "this.defaultHtmlBu tton has no properties" error.
      > I also tried postmethod = "none", which did prevent form submission
      but also
      > hid my form upon submission - I need the form to stay there.
      > Then, in http://www.helphost s.com/vme/ test2.htm, I added a dummy
      validate to
      > prevent the form from submitting altogether, so it makes no
      difference which
      > postmethod I use.
      > I this case, clicking the button works fine, but hitting ENTER
      still has the
      > original error.
      > To restate the problem: using a button control constructed
      separately from
      > the dialog, process the ENTER key the same way as the button click.
      > Any other ideas? Or do I need to revert back to using the "buttons"
      > attribute of the dialog?
      > _____
      > From: ydn-javascript@ yahoogroups. com [mailto:ydn-
      javascript@yahoogro ups.com]
      > On Behalf Of Gopalarathnam Venkatesan
      > Sent: Sunday, May 06, 2007 10:02 AM
      > To: ydn-javascript@ yahoogroups. com
      > Subject: Re: [ydn-javascript] Default Button Problem
      > Ron Rudman wrote:
      > >
      > >
      > > Thank very much for pointing out that DOCTYPE error!
      > >
      > > I didn't use type='submit' on the button because I don't want the
      > > submitted - For various reasons, I'm using an Ajax call to
      process it.
      > That's okay, you can still have the submit button and use Ajax.
      > Within the submit handler, process the data and prevent the default
      > action by invoking the "preventDefaqult( )" method of the Event
      > The snippet could be something like:
      > <form id="myform">
      > <input type="submit" value="...">
      > </form>
      > ...
      > YAHOO.util.Event. addListener( "myform", "submit", function (e) {
      > // process data
      > YAHOO.util.Event. preventDefault( e);
      > });
      > ...
      > The idea of having the "submit" button is for accessibility reasons.
      > HTH.
      > --
      > Gopalarathnam Venkatesan
      > http://gopalarathna <http://gopalarathna m.com/> m.com/

    Your message has been successfully submitted and would be delivered to recipients shortly.