submit problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • david

    submit problem

    I was experiencing a false bug with safari when trying to submit a post form
    from a javascript script:

    function my_submit()
    {
    document.theFor m.submit.click( );
    }

    it doesn't work in the "current" version (1.0 v85.6) of Safari (nothing
    happens) while it works with mozilla (1.5) and IE. So i tried:

    function my_submit()
    {
    document.theFor m.submit();
    }

    but i was having an error message in the Mac OS Console application.

    In fact, it was because of the name of my submit button:

    <input type="submit" name="submit" value="whatever ">

    but if i change the name of the button:

    <input type="submit" name="Submit" value="whatever ">
    ^

    then, the first method works on the 3 browsers :)

    Since i didn't find anything about that on google, i think it's a good idea to
    post it with the keywords i used for my research.

    Cheers

    --
    david

  • david

    #2
    Re: submit problem

    david wrote:
    [color=blue]
    > [...][/color]
    [color=blue]
    > then, the first method works on the 3 browsers :)[/color]

    the second method, sorry

    --
    david

    Comment

    • @SM

      #3
      Re: submit problem

      david a ecrit :
      [color=blue]
      > david wrote:
      >[color=green]
      > > [...][/color]
      >[color=green]
      > > then, the first method works on the 3 browsers :)[/color]
      >
      > the second method, sorry[/color]

      Ah! Bon! that's better ;-)

      with your last change in name of button to submit
      try in firts method :

      function my_submit() { document.theFor m.Submit.click( ); }

      ==> you ask to click on the element named 'Submit',
      that's to say on the right button : submit

      --
      *************** *************** *************** *************** **
      Stéphane MORIAUX : mailto:stephane OTER-MOImoriaux@wana doo.fr
      Aide aux Pages Perso (images & couleurs, formulaire, CHP, JS)

      *************** *************** *************** *************** **


      Comment

      Working...