We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,594 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Specifying a particular form

I have two forms on a page. Each calls some javascript code. One goes to paypal and one that goes to a send mail routine. How can I distinguish between the two so they don’t obstruct with each other?
Contact form descriptor:

<form action='sendMail.php' method='post' id="contact-form" class="form-horizontal"  >
        <fieldset>
         …

Paypal form descriptor:

<div id="donationForm">
                <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
                    <input type="hidden" name="cmd" value="_s-xclick">

I hope that makes sense since it seems that my application does not know what to do when the submit button is clicked?
I was also thinking that I could name my button “submit-contact” , instead of “submit” but this does not seem to work.

2
Contributors
2
Replies
1 Day
Discussion Span
3 Months Ago
Last Updated
10
Views
Question
Answered
rouse
Junior Poster
128 posts since Dec 2007
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

I have two forms on a page. Each calls some javascript code. One goes to paypal and one that goes to a send mail routine. How can I distinguish between the two so they don’t obstruct with each other?

There should only 1 Submit Form on the checkout sheet on a shopping cart.

You can't put 2 <form> in one page!

The contact form should be in a separate page.

When a customer press the submit button the data goes to the database and the page will redirected to the Paypal page with the data.

That is the correct way of doing it.

The only solution is try to put all the info on one form.

LastMitch
Industrious Poster
4,374 posts since Mar 2012
Reputation Points: 149
Solved Threads: 350
Skill Endorsements: 47
Question Answered as of 3 Months Ago by LastMitch

I found my way around the delema. Thanks!

rouse
Junior Poster
128 posts since Dec 2007
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page generated in 0.0586 seconds using 2.66MB