Solved

jquery button problem

Posted on 2011-03-02
1
264 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
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…

760 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

19 Experts available now in Live!

Get 1:1 Help Now