Using Javascript to submit form

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

    Using Javascript to submit form

    Is there anyway to create a javascript function to submit a form in the
    same html file?
  • Grant Wagner

    #2
    Re: Using Javascript to submit form

    Kenneth wrote:
    [color=blue]
    > Is there anyway to create a javascript function to submit a form in the
    > same html file?[/color]

    <body onload="documen t.forms['myForm'].submit();">
    <form name="myForm">
    <!-- form controls -->
    </form>
    </body>

    A lot of user agents will prompt the user as to whether they want to submit
    the form or not, and no, there isn't any way to avoid the prompt.

    --
    Grant Wagner <gwagner@agrico reunited.com>
    comp.lang.javas cript FAQ - http://jibbering.com/faq

    Comment

    • Kenneth

      #3
      Re: Using Javascript to submit form

      Grant Wagner wrote:[color=blue]
      > Kenneth wrote:
      >
      >[color=green]
      >>Is there anyway to create a javascript function to submit a form in the
      >>same html file?[/color]
      >
      >
      > <body onload="documen t.forms['myForm'].submit();">
      > <form name="myForm">
      > <!-- form controls -->
      > </form>
      > </body>
      >
      > A lot of user agents will prompt the user as to whether they want to submit
      > the form or not, and no, there isn't any way to avoid the prompt.
      >
      > --
      > Grant Wagner <gwagner@agrico reunited.com>
      > comp.lang.javas cript FAQ - http://jibbering.com/faq
      >[/color]


      perfect!

      thnks so much.

      Comment

      Working...