Solved

jquery button problem

Posted on 2011-03-02
1
267 Views
Last Modified: 2012-05-11
Hi

I have placed 2 buttons inside a form

<button class="addrow">add</button>
<input name="Submit" type="submit" class="button" value="Submit" />

i use this plugin to submit form

http://jquery.malsup.com/form/

Open in new window


problem is both buttons try to submit form. is there way to stop add button from submitting form and use that button for anther use?

Regards
0
Comment
Question by:3xtr3m3d
1 Comment
 
LVL 2

Accepted Solution

by:
mhmr earned 500 total points
ID: 35017019
Hello 3xtr3m3d

Yes there are :

<button class="addrow" onclick="event.preventDefault(); /* more code here*/">add</button>

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now