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

Re: [ydn-javascript] submit button in internet explorer

Expand Messages
  • Todd Kloots
    Wayne - Change the name of your button from submit to something else and it will work. The issue is that in IE, if you name a button submit it re-maps the
    Message 1 of 3 , Sep 30, 2008
    • 0 Attachment
      Wayne -

      Change the name of your button from "submit" to something else and it
      will work. The issue is that in IE, if you name a button "submit" it
      re-maps the "submit" method of the button's parent form to point to the
      HTML button instance. So form.submit() fails to work. Button uses the
      "submit" method, and that is why using the name "submit" breaks.

      - Todd

      D. Wayne Fincher wrote:
      >
      > I've got a submit button, marked up with html, type="submit", that
      > submits in firefox 3, and opera, but won't submit in internet
      > explorer, safari, or chrome.
      >
      > HTML Markup:
      > <div class="list-index" id="loginPage">
      > <form method="post" action="login.php?case=login2">
      > <input type="submit" name="submit" id="submit-button" value="Login" />
      > </form>
      > </div>
      >
      > Javascript:
      > YAHOO.util.Event.onContentReady('loginPage', function() {
      > subButton = new YAHOO.widget.Button("submit-button", {type: 'submit'});
      > });
      >
      > I can't figure out for the life of me why it's working in firefox and
      > opera, but doesn't seem to be working anywhere else. This is like some
      > of the simplest stuff! :(
      >
      >
    • D. Wayne Fincher
      OMG!! Todd Kloots, that s a life saver man! I feel a little noobish right now. I have tons of other buttons that work, but I guess for some reason I just
      Message 2 of 3 , Sep 30, 2008
      • 0 Attachment
        OMG!!

        Todd Kloots, that's a life saver man! I feel a little noobish right
        now. I have tons of other buttons that work, but I guess for some
        reason I just decided to toss a name on this button, when I normally
        don't do that. :O

        Thank you!



        --- In ydn-javascript@yahoogroups.com, Todd Kloots <kloots@...> wrote:
        >
        > Wayne -
        >
        > Change the name of your button from "submit" to something else and it
        > will work. The issue is that in IE, if you name a button "submit" it
        > re-maps the "submit" method of the button's parent form to point to the
        > HTML button instance. So form.submit() fails to work. Button uses the
        > "submit" method, and that is why using the name "submit" breaks.
        >
        > - Todd
        >
        > D. Wayne Fincher wrote:
        > >
        > > I've got a submit button, marked up with html, type="submit", that
        > > submits in firefox 3, and opera, but won't submit in internet
        > > explorer, safari, or chrome.
        > >
        > > HTML Markup:
        > > <div class="list-index" id="loginPage">
        > > <form method="post" action="login.php?case=login2">
        > > <input type="submit" name="submit" id="submit-button" value="Login" />
        > > </form>
        > > </div>
        > >
        > > Javascript:
        > > YAHOO.util.Event.onContentReady('loginPage', function() {
        > > subButton = new YAHOO.widget.Button("submit-button", {type:
        'submit'});
        > > });
        > >
        > > I can't figure out for the life of me why it's working in firefox and
        > > opera, but doesn't seem to be working anywhere else. This is like some
        > > of the simplest stuff! :(
        > >
        > >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.