Submit multipe forms with one submit button.

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

    #1

    Submit multipe forms with one submit button.

    Hi,
    I've got a recordset consisting of many records (anything up to 250)
    which currently loops to populate a form in each iteration. I need to
    post the form to an external URL on each loop, or alternatively
    populate multiple forms on one page and post each one in sequence.

    The problem I've had is that the posting seems to be too quick and
    only a handful arrive.

    I can loop with an alert pop-up that prompts for the next send, but
    it's v. inefficient. I'm told by some that it can't be done (don't
    fully understand why), but my manager (who must be obeyed) says it
    must be done.

    Any thoughts?

    PaulM
  • Lasse Reichstein Nielsen

    #2
    Re: Submit multipe forms with one submit button.

    paul_madigan@ya hoo.co.uk (Paul M) writes:
    [color=blue]
    > I've got a recordset consisting of many records (anything up to 250)
    > which currently loops to populate a form in each iteration. I need to
    > post the form to an external URL on each loop, or alternatively
    > populate multiple forms on one page and post each one in sequence.[/color]

    How are the forms created? You say that you "populate a form in each
    iteration". What, *exactly*, is happening? Where is the code that
    populates the form running? On the server or locally?

    What happens when you submit one form? It is sent to a server that
    returns a page which does what?

    Do you control the platform that the forms are being submitted from?
    [color=blue]
    > The problem I've had is that the posting seems to be too quick and
    > only a handful arrive.[/color]

    If you submit a new form with the same target as the old form, the old
    request is interrupted. That can happen even before the requrest have
    been sent, so the server never sees it.
    [color=blue]
    > I can loop with an alert pop-up that prompts for the next send, but
    > it's v. inefficient. I'm told by some that it can't be done (don't
    > fully understand why), but my manager (who must be obeyed) says it
    > must be done.[/color]

    It sounds very much like a problem that is being attacked the wrong
    way. If you can build a page that contains a form that must be
    submitted, you should be able to send the contents directly to the
    server without going through a browser.

    Otherwise, you need to find a way to wait for the submit to complete
    before submitting the next form. Since the form is submitted to a
    different domain, cross domain scripting can make that hard. In IE,
    you might use an HTML Application, which have extended scipting rights.

    Or you could submit each form to a different target:

    <form id="foo" target="tgt_foo " action="...">
    ....
    </form>
    <iframe id="tgt_foo" style="display: none"></iframe>

    /L
    --
    Lasse Reichstein Nielsen - lrn@hotpop.com
    Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
    'Faith without judgement merely degrades the spirit divine.'

    Comment

    Working...