Individual and multiple 'batch' Form Posting using HTML?

Discussion in 'HTML' started by Fernie, Dec 25, 2004.

  1. Fernie

    Fernie Guest

    Dear friends,

    I have 20 different forms on a single html page. Each form has its own text
    input field and submit button to update text and a submit button to delete.

    Each of the 20 forms consists of the following html:

    <FORM method='POST' action='Products.cgi'>

    // Display product details.

    // Display a text Input Field.

    // Display an submit 'update' button to post both
    // input and hidden field data.

    // Display a submit 'delete' button to post the
    // record ID and delete the record.

    </FORM>

    When I click on the submit button belonging to any of the 20 forms on the
    html page, the appropriate data is correctly posted to the server and either
    a successful update or deletion is performed.



    Now for the problem. All along, I had wrongly assumed that I could embed
    all 20 forms within a single 'larger' form and perform a bulk update/delete
    process. That large form would submit all of the smaller forms input and
    hidden field data in one whack. After trying to figure it out, I sadly
    discovered that this was not possible using html.

    Ideally, I would like to handle this without relying on client side
    scripting. Is there a way to accomplish this using plain html? If there is
    not a way to do this, I am thinking that it may be best to assign each
    item's delete button to a GET. Also, I'd have to get rid of the individual
    update buttons and have a single form that updates the whole batch
    regardless if one or two items were updated.

    Any comments or suggestions would be much appreciated.

    Regards,

    Fernie



    --

    ELKNews FREE Edition - Empower your News Reader! http://www.atozedsoftware.com
     
    Fernie, Dec 25, 2004
    #1
    1. Advertising

  2. Fernie

    Mitja Guest

    Fernie wrote:
    > Dear friends,
    >
    > I have 20 different forms on a single html page. Each
    > form has its own text input field and submit button to
    > update text and a submit button to delete.
    >
    > Now for the problem. All along, I had wrongly assumed
    > that I could embed all 20 forms within a single 'larger'
    > form and perform a bulk update/delete process. That
    > large form would submit all of the smaller forms input
    > and hidden field data in one whack. After trying to
    > figure it out, I sadly discovered that this was not
    > possible using html.


    Make it all _one_ big form with 21 buttons (submit1,
    submit2, ..., submitAll). When the form is submitted, have
    your server-side script check for the name of the button via
    which the form was submitted. If the name is e.g. submit7,
    only do the requested operations on product number 7; if the
    name is submitAll, process all POST data.
    The problem (probably) here are users submitting the page
    with the ENTER key. There are guidelenes as to which
    key-value pair browsers should submit, but they are not
    implemented well enough to be relied upon. Google for html
    form submit enter or something.

    HTH,
    Mitja
     
    Mitja, Dec 26, 2004
    #2
    1. Advertising

  3. Fernie

    Fernie Guest

    "Mitja" <> wrote in message
    news:Rzvzd.7414$...


    > Make it all _one_ big form with 21 buttons (submit1,
    > submit2, ..., submitAll).


    Mitja,

    Thank you very much for the excellent suggestion!

    Best regards,

    Fernie



    --

    ELKNews FREE Edition - Empower your News Reader! http://www.atozedsoftware.com
     
    Fernie, Dec 26, 2004
    #3
  4. Fernie

    Fernie Guest

    Mitja,

    I began looking at the form variables that are posted (via post) to the web
    server and noticed something interesting with the buttons I use. I have a
    button named btnSave. When clicked, I end up with an expected variable
    named 'btnSave' and the value is 'Save Changes'.

    In another instance, I post by clicking on a gif image (instead of a regular
    button). Looking at the server variables, I get the mouse coordinates of
    the button click. For example, I have an image button named 'btnUpdate'.
    The form variables that are posted to the server are:

    btnUpdate.x and the value is 40
    btnUpdate.y and the value is 5

    This means that I cannot specifically look for a variable named btnUpdate,
    unless I trim off the '.x' or the '.y'. Then I get the variables that you
    suggested that I look at (btnUpdate1, btnUpdate2, ...).


    Regards,

    Fernie



    --

    ELKNews FREE Edition - Empower your News Reader! http://www.atozedsoftware.com
     
    Fernie, Dec 27, 2004
    #4
    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. alanb
    Replies:
    2
    Views:
    541
    alanb
    Apr 23, 2004
  2. mc
    Replies:
    8
    Views:
    392
    Larry Bud
    Dec 18, 2006
  3. AmitKu
    Replies:
    7
    Views:
    521
    John Timney \(MVP\)
    Jan 8, 2007
  4. Spencer H. Prue

    accessing ado and MSDE on individual web form

    Spencer H. Prue, Feb 18, 2005, in forum: ASP General
    Replies:
    1
    Views:
    141
    Iain Norman
    Feb 18, 2005
  5. Replies:
    0
    Views:
    128
Loading...

Share This Page