Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <aura:component>
- <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
- <form action=" url" method="post" I'd="form"/>
- <Inputtype="submit",value="submit" >
- </aura:component>
- doInit: function(component, event, helper)
- {
- $( "form" ).submit(function( event ) {
- event.preventDefault();
- return false;
- });
- }
- submitForm : function () {
- $( "form" ).submit(function( event ) {
- event.preventDefault();
- return false;
- });
- }
- <input type="submit" name="submit" onsubmit="submitForm()"/>
- $("form").submit(function( event ) {
- event.preventDefault();
- url = $form.attr( 'action' );
- var posting = $.post( url, { email: $('#email').val() } );
- posting.done(function( data ) {
- alert("success")
- });
- alert("submitted")
- });
- $( "form" ).submit(function( event ) {
- event.preventDefault();
- return false;
- });
- <form action="javascript:return false" aura:id="sendNotificationForm" ... >
- ({
- ...
- ,sendNotification: function(component, event, helper) {
- ....
- event.preventDefault();
- ...
- }
- ...
- })
Add Comment
Please, Sign In to add comment