User Profile

Collapse

Profile Sidebar

Collapse
gatsby
gatsby
Last Activity: Jul 10 '12, 05:47 PM
Joined: Jun 9 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • gatsby
    replied to avoid onkeyup event on hitting enter key
    Code:
    function func_2(str)
    {
    
      $(document).ready(function() {
      $('input[type=text]').on('keyup', function(e) {
      if(e.which == 13) {
       var check=fal;
      }
      })
      });
    	
    if(check==fal){
    	func_1();
    }else
    {
    
    var xmlhttp;
    if (str.length==0)
      { 
      document.getElementById("mydiv").innerHTML="";
      return;
    ...
    See more | Go to post

    Leave a comment:


  • gatsby
    started a topic avoid onkeyup event on hitting enter key

    avoid onkeyup event on hitting enter key

    I have form which contains a text field and a submit button.
    func_1() is called onsubmit event of the form and func_2() is called onkeyup event of text field.My problem is that func_2() is also called onkeyup event of enter key, I want to avoid calling func_2() on hiting enter key. Is there any better and easier way to do it?? plz suggest me
    See more | Go to post
No activity results to display
Show More
Working...