Simple jquery help!

Namecheap AuctionsNamecheap Auctions
NamecheapNamecheap
SpaceshipSpaceship
Watch

BuLLDoG

Established Member
Impact
12
I have been following this tutorial (http://trevordavis.net/blog/ajax-forms-with-jquery/) it works perfectly. However when I change the submit button to a input type="image"... it doesn't send. It still has the id as submit. I think it has something to do with the javascript.

Would anyone know how to solve this? thanks

---------- Post added at 02:28 PM ---------- Previous post was at 02:02 PM ----------

fixed :)
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Out of curiosity, can I ask what the problem was?
 
0
Close
This should get the form to submit for you:

Code:
$(function() {
  $('#submit').click(function() {
    $(this).parents('form')
           .submit();
  });
});

The input with type of submit will submit a form when clicked the above jquery will listen to the click event on the input with id submit and then find the form element and submit it as you expected.

Cheers,

Jay
 
0
Close
wondering if anyone tried it and got it to work with;

$(function() {
$('#submit').click(function() {
$(this).parents('form')
.submit();
});
});


thanks
 
0
Close
CatchedCatched

We're social

Escrow.com
Spaceship
CryptoExchange.com
Domain Recover

NamePros updates

Quick replies: search, your most used replies, and more on every post
Quick replies are easier to find and use now. The quick reply menu has a search box. Type a few letters to find the reply you want. A...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back