Can i have more access to post data in a file other than mentionedin 'action' param ?

Discussion in 'Javascript' started by pradnya, Jan 10, 2008.

  1. pradnya

    pradnya Guest

    Can i have access to post data in a file other than mentioned in
    'action' param ?

    if yes , how to achive this ?
    pradnya, Jan 10, 2008
    #1
    1. Advertising

  2. Re: Can i have more access to post data in a file other thanmentioned in 'action' param ?

    On Jan 10, 1:45 pm, pradnya <> wrote:
    > Can i have access to post data in a file other than mentioned in
    > 'action' param ?
    >
    > if yes , how to achive this ?


    You could use JS to collect data from a form and send it via an AJAX
    request to another file. That could be done very easily with the
    prototype.js library, which is what I use, but you can certainly find
    other libraries or methods of achieving the same result.

    take a look at http://prototypejs.org/api/form/serialize
    and http://prototypejs.org/api/ajax/request

    With Prototype it would look something like this:

    new Ajax.Request('the/url/to/another/file.php', { parameters: $
    ('myForm_ID').serialize() });

    Hope it helps.
    LexNonScripta, Jan 10, 2008
    #2
    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.

Share This Page