ajax run 2 scripts?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Geoff Cox

    ajax run 2 scripts?

    Hello

    I have the following code which works fine and runs the php script to
    send data to a mysql db.

    new Ajax.Updater(
    'updateDiv',
    'sendSpaResults .php',
    {
    asynchronous:tr ue,
    method:'post',
    parameters: params
    }
    );

    How can I also run formmail.cgi to send the data via email? The code
    below is wrong.

    new Ajax.Updater(
    'updateDiv',
    'sendSpaResults .php',
    '../formmail/formmail.cgi',
    {
    asynchronous:tr ue,
    method:'post',
    parameters: params
    }
    );

    Cheers

    Geoff
  • GArlington

    #2
    Re: ajax run 2 scripts?

    On Nov 5, 9:22 am, Geoff Cox <g...@freeuk.no tcomwrote:
    Hello
    >
    I have the following code which works fine and runs the php script to
    send data to a mysql db.
    >
       new Ajax.Updater(
            'updateDiv',
            'sendSpaResults .php',
            {
                asynchronous:tr ue,
                method:'post',
                parameters: params
            }
        );
    >
    How can I also run formmail.cgi to send the data via email? The code
    below is wrong.
    >
       new Ajax.Updater(
            'updateDiv',
            'sendSpaResults .php',
            '../formmail/formmail.cgi',
            {
                asynchronous:tr ue,
                method:'post',
                parameters: params
            }
        );
    >
    Cheers
    >
    Geoff
    Two separate calls, or you can create new or modify existing response
    script to do everything you want...

    Comment

    • Geoff Cox

      #3
      Re: ajax run 2 scripts?

      On Wed, 5 Nov 2008 03:24:49 -0800 (PST), GArlington
      <garlington@tis cali.co.ukwrote :
      >On Nov 5, 9:22 am, Geoff Cox <g...@freeuk.no tcomwrote:
      >Hello
      >>
      >I have the following code which works fine and runs the php script to
      >send data to a mysql db.
      >>
      >   new Ajax.Updater(
      >        'updateDiv',
      >        'sendSpaResults .php',
      >        {
      >            asynchronous:tr ue,
      >            method:'post',
      >            parameters: params
      >        }
      >    );
      >>
      >How can I also run formmail.cgi to send the data via email? The code
      >below is wrong.
      >>
      >   new Ajax.Updater(
      >        'updateDiv',
      >        'sendSpaResults .php',
      >        '../formmail/formmail.cgi',
      >        {
      >            asynchronous:tr ue,
      >            method:'post',
      >            parameters: params
      >        }
      >    );
      >>
      >Cheers
      >>
      >Geoff
      >
      >Two separate calls, or you can create new or modify existing response
      >script to do everything you want...
      OK! How do I modify the existing response?

      Thanks

      Geoff

      Comment

      • Erwin Moller

        #4
        Re: ajax run 2 scripts?

        Geoff Cox schreef:
        On Wed, 5 Nov 2008 03:24:49 -0800 (PST), GArlington
        <garlington@tis cali.co.ukwrote :
        >
        >On Nov 5, 9:22 am, Geoff Cox <g...@freeuk.no tcomwrote:
        >>Hello
        >>>
        >>I have the following code which works fine and runs the php script to
        >>send data to a mysql db.
        >>>
        >> new Ajax.Updater(
        >> 'updateDiv',
        >> 'sendSpaResults .php',
        >> {
        >> asynchronous:tr ue,
        >> method:'post',
        >> parameters: params
        >> }
        >> );
        >>>
        >>How can I also run formmail.cgi to send the data via email? The code
        >>below is wrong.
        >>>
        >> new Ajax.Updater(
        >> 'updateDiv',
        >> 'sendSpaResults .php',
        >> '../formmail/formmail.cgi',
        >> {
        >> asynchronous:tr ue,
        >> method:'post',
        >> parameters: params
        >> }
        >> );
        >>>
        >>Cheers
        >>>
        >>Geoff
        >Two separate calls, or you can create new or modify existing response
        >script to do everything you want...
        >
        OK! How do I modify the existing response?
        He said: "response script".
        In your case: sendSpaResults. php
        Why not let sendSpaResults. php do the emailing?

        Regards,
        Erwin Moller
        >
        Thanks
        >
        Geoff

        --
        "There are two ways of constructing a software design: One way is to
        make it so simple that there are obviously no deficiencies, and the
        other way is to make it so complicated that there are no obvious
        deficiencies. The first method is far more difficult."
        -- C.A.R. Hoare

        Comment

        • Geoff Cox

          #5
          Re: ajax run 2 scripts?

          On Wed, 05 Nov 2008 13:41:22 +0100, Erwin Moller
          <Since_humans_r ead_this_I_am_s pammed_too_much @spamyourself.c omwrote:
          >He said: "response script".
          >In your case: sendSpaResults. php
          >Why not let sendSpaResults. php do the emailing?
          ah.. but can the php script call the formmail.cgi script which is a
          Perl script?

          Cheers

          Geoff

          >
          >Regards,
          >Erwin Moller

          Comment

          • Gregor Kofler

            #6
            Re: ajax run 2 scripts?

            Geoff Cox meinte:
            On Wed, 05 Nov 2008 13:41:22 +0100, Erwin Moller
            <Since_humans_r ead_this_I_am_s pammed_too_much @spamyourself.c omwrote:
            >
            >He said: "response script".
            >In your case: sendSpaResults. php
            >Why not let sendSpaResults. php do the emailing?
            >
            ah.. but can the php script call the formmail.cgi script which is a
            Perl script?
            Yes. But I suppose you switch to another NG then.

            Gregor

            Comment

            • David Mark

              #7
              Re: ajax run 2 scripts?

              On Nov 5, 4:22 am, Geoff Cox <g...@freeuk.no tcomwrote:
              Hello
              >
              I have the following code which works fine and runs the php script to
              send data to a mysql db.
              Not from where I'm sitting. Perhaps it requires a certain 100K+
              library to work?

              Comment

              Working...