Submitting two forms in one click

Discussion in 'Javascript' started by paratge, Apr 16, 2007.

  1. paratge

    paratge Guest

    Hi,

    I'm updating one form in an iframe, with another in a main page. That
    works fine, th probliem is how to submit two forms with one click.

    For now i get an error "permission denied" how can i fix this ?

    Thanks for your help
     
    paratge, Apr 16, 2007
    #1
    1. Advertisements

  2. paratge

    Daz Guest

    Can we see the script in the correct context?
     
    Daz, Apr 16, 2007
    #2
    1. Advertisements

  3. paratge

    Daz Guest

    My recommendation would be to either use Ajax:
    This way you can send the data and validate it behind the scenes,
    meaning it can be quicker and less intensive on the server. This is
    quite easy to acheive, and feels fantastic to use, but is not widley
    supported by all browsers.

    Or, only submit 1 form:
    The form can be created on the fly, and you can set hidden inputs to
    the values your other forms contain, before submitting it.

    My question, however, is why you have two forms? Why do you not just
    have them both as one, it would certainly make more sense, and I can't
    think of any reason why you'd want more than one form per page, but my
    brain is broken.
     
    Daz, Apr 16, 2007
    #3
  4. paratge

    Daz Guest

    Sorry, I misread your post.

    The access denied error is caused because you are trying to access
    data in an iframe that's from another domain. There is a work around
    for it, I just don't know exactly what it is. The reason it's not
    allowed, is so that you can't use your script to transmit potentially
    sensitive data from another site, that a user has entered, to your
    own, such as credit card information. I recommend you google the term
    "javascript rpc cross domain", and see what comes up.

    All the best.

    Daz.
     
    Daz, Apr 16, 2007
    #4
  5. paratge

    paratge Guest

    That's right you need an explaination :
    The web site i'm building allows merchants to order parts and others
    things. In function of their activity, the order form of a supplier is
    called in an iframe. Thus, i must keep informations to control, and
    send order to the supplier in one shot.
    But in fact, it's not my own will, just the one of my customer...
     
    paratge, Apr 16, 2007
    #5
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.