Problem with working of button

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SaiRockinGuy
    New Member
    • Feb 2009
    • 11

    Problem with working of button

    Hi,
    I am facing the problem with button click in ajax in firefox can anyone help me in this issue.
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    We could if you give more information, e.g. the code which causes the problem plus an explanation of it.

    Comment

    • SaiRockinGuy
      New Member
      • Feb 2009
      • 11

      #3
      This is button tag that is used in jsp

      Code:
      <td class="testo" colspan="2"><input id="filtera" class="button_css"
      					type="button" value="Filtra" />
      i am calling this

      Code:
      $(document).ready(function(){ 
      		 $("#filtera").click(function(){
      alert("Sample test for button");
      
      });
      Click event is working fine in ie but fails in firefox
      Last edited by acoder; Feb 25 '09, 12:17 PM. Reason: Added [code] tags

      Comment

      • SaiRockinGuy
        New Member
        • Feb 2009
        • 11

        #4
        i am using button tag to call this function:

        Code:
        <input id="filtera" class="button_css"	type="button" value="Filtra" />
        
        $(document).ready(function(){ 
        		 $("#filtera").click(function(){
        alert("Sample test for button");
        });
        });
        The same snippet is working fine with ie but fails with firefox
        Last edited by acoder; Feb 25 '09, 12:29 PM. Reason: Added [code] tags

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          First of all, there's no Ajax involved here.

          Secondly, you forgot to close the first function with })

          PS. please use [code] tags when posting code.

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            Originally posted by SaiRockinGuy
            Code:
            <input id="filtera" class="button_css"	type="button" value="Filtra" />
            
            $(document).ready(function(){ 
            		 $("#filtera").click(function(){
            alert("Sample test for button");
            });
            });
            This code works fine. Can you post the rest of the relevant code?

            Comment

            • SaiRockinGuy
              New Member
              • Feb 2009
              • 11

              #7
              Code:
              $.ajax({
                                      url : "SampleTester.action" ,
              			cache: false,
              			success : function ( ) {
              			alert(data);
              			}
              Last edited by acoder; Feb 25 '09, 12:59 PM. Reason: Added [code] tags

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #8
                That's unrelated to your previous code. Which one doesn't work?

                In any case, the code should be:
                Code:
                success : function (data) {
                            alert(data);
                            }
                and don't forget to close the function.

                Do you get any errors in Firefox?

                Comment

                Working...