newbie question on multiple submits in page

Discussion in 'Javascript' started by jpf, Apr 22, 2004.

  1. jpf

    jpf Guest

    Currently I have the submit function definition in the header and multiple
    rows where the submit function is called. It only works if there is one row,
    I'd like to change the function so that it works with multiple rows but I'm
    not sure how to do this. Can anyone help please?

    This is generated by a perl script so you'll see some perl variables in
    there and also some style sheet stuff which generates the submit text and
    should not be relevant. I believe that I need to change the form name for
    each row and pass that into the function. I don't know enough about
    javascript to do this though :(

    Thanks

    Here's the header data:

    <script language="JavaScript">
    <!--
    function submitform() {
    document.myform.submit();
    }
    -->
    </script>

    Here's what's currently in each row:

    <tr>
    <td>
    <form style="margin-bottom:0;" method="POST" name="myform"
    action="find.exe">
    <input type="hidden" name="datafile" value="$datafile">
    <input type="hidden" name="strt" value="$mark">
    <input type="hidden" name="pgln" value="$pgln">
    <a href="javascript:document.myform.submit()"
    onmouseover="lite(this)" onmouseout="lite(this)"
    onfocus="this.blur()">View</a>
    <noscript><input type="submit" value="View"></noscript>
    </form>
    </td>
    <td> &nbsp; $name </td>
    <td> &nbsp; $owid </td>
    <td> &nbsp; $add1 $add2 </td>
    </tr>
    jpf, Apr 22, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Umesh

    Page Submits twice

    Umesh, Feb 24, 2006, in forum: HTML
    Replies:
    3
    Views:
    598
    Alan J. Flavell
    Feb 24, 2006
  2. =?Utf-8?B?QWxleCBNYWdoZW4=?=

    User Controls with Form fields & Multiple Submits

    =?Utf-8?B?QWxleCBNYWdoZW4=?=, May 7, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    399
  3. Maurice LING
    Replies:
    2
    Views:
    1,038
    Maurice LING
    Mar 18, 2008
  4. Kuntal Joisher

    multiple form submits happening on window close

    Kuntal Joisher, Sep 6, 2003, in forum: Javascript
    Replies:
    0
    Views:
    109
    Kuntal Joisher
    Sep 6, 2003
  5. Matthew Sims
    Replies:
    0
    Views:
    128
    Matthew Sims
    Mar 4, 2004
Loading...

Share This Page