Click here to Skip to main content
16,009,144 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have some problem here..when in page (addisy.php which is have jquery datepicker and its work well.) i submit my form using ajaxForm. after submitting,the page has loaded the main page which is name as isylist.php. then, if i click again the addisy.php, the jquery datepicker not working anymore..can codeproject member help me where in the code was error or conflict??

my code is here : addisy.php

JavaScript
<script src="js/jquery.js"></script>
        <script src="json/jquery.form.js"></script>
        <script>
         var j = $.noConflict();
         (function() {
         j('#isyform').ajaxForm({
           success: function(xhr) {
          },
         complete: function(xhr) {
             alert(xhr.responseText);
              $('#frame').load('isylist.php');
                 }
             }); 
             })();

</script>

PHP
<div id="frame">
       <form action="saveisy.php" method="post" id="isyform">
       <input type="text" id="datecollected" name="datecollected" class="datepicker" />
        <script>
       $(document).ready(function () {
        $("#datecollected").datepicker({
          changeMonth: true,
          changeYear: true,
          dateFormat: "d-m-yy"
        });
      });

      </script>
      <input type="submit" id="save" name="save" value="Save" />
       </form>
 </div>
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900