开发者

Submitting forms with two different methods?

开发者 https://www.devze.com 2022-12-21 23:39 出处:网络
I\'m trying to create a quoting mechanism for my website that will collect a) information about the user (name, email, etc.) and b) four or five values (item quantities) that will be used to generate

I'm trying to create a quoting mechanism for my website that will collect a) information about the user (name, email, etc.) and b) four or five values (item quantities) that will be used to generate a quote.

What I want to do is to have all of the information (both sets a and b) sent to me using formmail, and for the values to be passed on to the next page, where they can be used by my calculating script. I'm not sure how to do this without using two separate forms (and I'm not 100% sure how to do it even with two forms). It seems that the simple way to move the values is to use GET, whereas formmail uses POST.

Is there a way to use only one submit button, email all info to me, pa开发者_JAVA技巧ss just the values to my script, and display them on another page?


If you are not scared of some javascript you can easily use XMLHttpRequest to post the form async to mail before letting the action of the form post to the next page...

0

精彩评论

暂无评论...
验证码 换一张
取 消