My favorites | Sign in
Project Home Downloads Issues
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 171: Feature request
2 people starred this issue and may be notified of changes. Back to list
Status:  Invalid
Owner:  ----
Closed:  Feb 2009


 
Reported by elledi...@gmail.com, Feb 18, 2009
Hi all you developers out there ! :-)

I first want to express how greatfull i am that some people out there is so
good at this jQuery, Javascript, Ajax, and stuff like that... But I can't,
so lets get over that point part.

I am missing the opportunity to submit a form with an <a>
I am styling the buttons I use on my website. So because of that, I want
something like onclick="javascript:TheFormNameOrIDorClassOrThisForm.submit();".

Is this possible? And if it is, would some of you guys help me? :-)
Feb 18, 2009
#1 Mamali.S...@gmail.com
I do not understand correctly your question,  but if you look how to code a click
event of <a> the following could help you:
let's say you have <a class="myClass" id="myID">
you get a jquery object with the following
$('a.myClass') or $('#myID') then you can bind click event
$('#myID').click(function(e){
// Prevent the default behavior of <a> clicking
e.preventDefault()
// Now add your event handling for example
yourForm.submit();
// finally return false
return false;

});
Feb 18, 2009
Project Member #2 nyro...@gmail.com
<a href="#" id="link">Submit form</a>
<form action="test.php" id="myForm">
....
</form>
<script type="text/javascript">
$(function() {
 $('#link').click(function(e) {
  e.preventDefault();
  $('#myForm').submit();
 });
});
</script>
Status: Invalid

Powered by Google Project Hosting