Hi ,   
I have problem with Form in HTML .   


I cannot access button like this 


HTML PART 

<div id="newsletter" class="facebox" style="display: none;"> 
    
<form id="myForm"  class="jqTransform"  > 
          
         <input type="text" name="email" id="emaill" value="wpisz email"
maxlength="50" /> 
         <input type="button" class="buttonNewsSub" id="submit"
name="submit" value="wyƛlij" /> 
        
</form> 
                        
<script type="text/javascript"> 
$(function() { 
$("form#myForm-DISABLED").jqTransform(); 
}); 
</script>       
                                
</div> 

-------- 

I have no succces with accesing button from that Form ,  I use  #myForm  
and other    :button   .class   and no succes .   

SCRIPT JQUERY 


<script type="text/javascript"> 

$(document).ready(function() { 

    var emailT = function() { 
      var email = $("#emaill").val() 
                return (email);       
    }; 
    
    
// alert( emailT); 

alert('Ready'); 
        
$('#myForm').serialize() 

function showValues() { 
     // var str = $("form").serialize(); 
      //$("#myForm").text(str); 
    } 

$("#myForm input[type=button]").click(function () { 
  
    alert('klik');      
           showValues(); 
        
        var email = emailT(); 

        var dataString = 'addr='+ $("#emaill").val() + '&action=sub'; 
    
      $.ajax({ 
        
        type: "get", 
        url: "maillist/index.php", 
        data: dataString, 
        success: function(data) { 
    
  $('#faceboxDiv').empty(); 
            var response = $(data).find('#faceboxDiv').html(); 
            $('#faceboxDiv').hide().html('<br><br><strong>' + data +
'</strong><br><br>').fadeIn(); 
            $(".close").click(function(){location.reload()} 
          ); 
       }}); 
    
    }); 
   }   
); 
</script> 

......................... 


Please help  ,   how can I assign  .click()   to submit  properly  ? 
-- 
View this message in context: 
http://www.nabble.com/Form-Elements-.-button---with-jQuery-tp24644258s27240p24644258.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to