forum

Home / DeveloperSection / Forums / call custom JS function inside jquery/ajax that is defined in an external .js file

call custom JS function inside jquery/ajax that is defined in an external .js file

Anonymous User 1765 23-Nov-2014

only function excute once, then make then whole part of jquery doesn't work. I tried to search but i didn't find right answer. CODE:

<script type="text/javascript" src="Plugs/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="Plugs/jquery.validate.min.js"></script>
<script type="text/javascript" src="Plugs/pop-up.js"></script> <!-- FILE THAT CONTAINS function popup(divNama) { /*instruction*/ } -->
<script type="text/javascript">
$(document).ready(function(){
    //document.write('');
    $("#feeStructure").validate({  
        submitHandler: function(form) {
              popup('popUpDiv'); // custom fn that fire once and make jquery/ajax stop working
            $.post('michangoProc.php',$("#feeStructure").serialize(), function(data) {
                    $('#msgErr').html(data);
        });
        }
    });
        });
        </script>


Updated on 24-Nov-2014
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By