HighDots Forums  

two action commands within one html form?

Javascript JavaScript language (comp.lang.javascript)


Discuss two action commands within one html form? in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Christophe
 
Posts: n/a

Default two action commands within one html form? - 09-19-2003 , 03:53 PM






Greetings from Paris:

Is it possible to have two actions command within the same html form?

I have a form including an action that send the content of the form
within a very nicely formatted e-mails to given adresses.

Now, I would like to have a second action to feed an online database
(csv file)with the data submitted through the form. (I have the script
to do this).

Each action works well exclusively (one without the other) but I
haven't been successful having two action commands in the same form.

Is this possible? If yes, I thank you in advance for any tips.

Best regards from Paris,

Christophe

Reply With Quote
  #2  
Old   
Lasse Reichstein Nielsen
 
Posts: n/a

Default Re: two action commands within one html form? - 09-19-2003 , 04:32 PM






cjoly (AT) bigfoot (DOT) com (Christophe) writes:

Quote:
Is this possible? If yes, I thank you in advance for any tips.
No.

What you can do, is to collect the data manually (with Javascript) and
build an URL corresponding to what the form would send, and then
send it yourself before the form is submitted.

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


Reply With Quote
  #3  
Old   
David Dorward
 
Posts: n/a

Default Re: two action commands within one html form? - 09-19-2003 , 04:35 PM



Christophe wrote:

Quote:
Is it possible to have two actions command within the same html form?
No (not in any sensible way anyway). Have the action point to one script
that does two jobs (or does one job then performs an http redirect to
another script to do a different job).


--
David Dorward http://dorward.me.uk/


Reply With Quote
  #4  
Old   
Gordan
 
Posts: n/a

Default Re: two action commands within one html form? - 09-19-2003 , 04:43 PM



"Christophe" <cjoly (AT) bigfoot (DOT) com> wrote

Quote:
Greetings from Paris:

Is it possible to have two actions command within the same html form?
I'm really not sure about this but there's this:

<form ....... onSubmit="">

I use this to run some javascript form_fields check before performing the
form action
one could perhaps trigger the script from here??

correct me if Im wrong

Gordan :-)




Reply With Quote
  #5  
Old   
Christophe
 
Posts: n/a

Default Re: two action commands within one html form? - 09-21-2003 , 03:43 PM



Thank you.



Lasse Reichstein Nielsen <lrn (AT) hotpop (DOT) com> wrote

Quote:
cjoly (AT) bigfoot (DOT) com (Christophe) writes:

Is this possible? If yes, I thank you in advance for any tips.

No.

What you can do, is to collect the data manually (with Javascript) and
build an URL corresponding to what the form would send, and then
send it yourself before the form is submitted.

/L

Reply With Quote
  #6  
Old   
Christophe
 
Posts: n/a

Default Re: two action commands within one html form? - 09-21-2003 , 03:45 PM



David:

Thank you. I will look into conbining the two jobs in one script.

David Dorward <dorward (AT) yahoo (DOT) com> wrote

Quote:
Christophe wrote:

Is it possible to have two actions command within the same html form?

No (not in any sensible way anyway). Have the action point to one script
that does two jobs (or does one job then performs an http redirect to
another script to do a different job).

Reply With Quote
  #7  
Old   
Christophe
 
Posts: n/a

Default Re: two action commands within one html form? - 09-21-2003 , 03:46 PM



Gordan:

Thank you for your help.

"Gordan" <gordanMENE (AT) torkulMAKNI (DOT) hr> wrote

Quote:
"Christophe" <cjoly (AT) bigfoot (DOT) com> wrote in message
news:70c551b6.0309191253.28e695d3 (AT) posting (DOT) google.com...
Greetings from Paris:

Is it possible to have two actions command within the same html form?

I'm really not sure about this but there's this:

form ....... onSubmit=""

I use this to run some javascript form_fields check before performing the
form action
one could perhaps trigger the script from here??

correct me if Im wrong

Gordan :-)

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.