Popular Posts

Sep 18, 2011

Keep The Searched Values In The Fields In PHP



<script type="text/javascript">
  $(document).ready(function(){
      var __postBack =  '<?php echo json_encode($_POST); ?>';
      var obj = jQuery.parseJSON(__postBack);
     
      $.each(obj,function(key, value){
          $("input[name="+key+"]").val(value);
          $("select[name="+key+"]").val(value);
          $("textarea[name="+key+"]").val(value);
     });
  });
</script>

No comments:

Post a Comment