i am using the.load function to load the page dynamily , but the code doesnot run on ff.

$(document).ready(function(e) {

    $('#txtAuction').keyup(function(){

        check_availability();
    });

    $('#txtCategories').change(function(){

        var options = '';
            $.getJSON("getProducts.php",{id: $(this).val()}, function(data){
              for (var i = 0; i < data.length; i++) {
                  if(data[i].optionDisplay=="No File Categories")
                  {
                      options = '<option disabled="disabled" selected="selected">No products</option>';
                  }
                  else
                  {

                options += '<option value="' + data[i].optionValue + '">' + data[i].optionDisplay + '</option>';
                  }
              }
              $("select#txtProducts").html(options);
            });
        });

});



    function getProducts()
    {
        var cat=$('#txtCategories').val()
        $.getJSON('getProducts.php', {CatName:$('#txtCategories').val()}, function(data) {
        var select = $('#txtProducts');
        var options = select.attr('options');
        $('option', select).remove(); 
        $.each(data, function(index, array) {
            options[options.length] = new Option(array['Name']);
        });
    });

        /*$('#wait_1').hide();
    $('#txtCategories').change(function(){
      $('#wait_1').show();
      $('#result_1').hide();
      $.post("getProducts.php", {
        func: "drop_1",
        drop_var: $('#txtCategories').val()
      }, function(response){
        $('#result_1').fadeOut();
        setTimeout("finishAjax('result_1', '"+escape(response)+"')", 400);

      });
        return false;
    });*/

}

        function finishAjax(id, response) {
  $('#wait_1').hide();
  $('#'+id).html(unescape(response));
  $('#'+id).fadeIn();
  $('#sltProduct').css('display','block');

}
    function check_availability()
    {
    var new_Auction =$('#txtAuction').val();
    $.post('checkAuction.php',{txtAuc:$('#txtAuction').val()},
        function(result){
            if(new_Auction.length==0)
            {
                $('#message').html('');
            }
            else
            {
            if(result==1)
            {
                $('#message').html(new_Auction + ' is Available').css('color','#0C3');
                $('input[id=btnEnter]').removeAttr('Disabled');
             //$('h4.alert_success').css("display","block");
            // $('h4.alert_success').html(new_Auction + ' is Available');  
            //$('h4.alert_success').fadeOut(5000);   
            }
             else
             {
                $('#message').html(new_Auction + ' is not Available').css('color','#F00');
                $('input[id=btnEnter]').attr('Disabled','Disabled');
                //$('h4.alert_error').css("display","block"); 
                //$('h4.alert_error').html(new_Auction + ' is not available'); 
             }
            }

        }




);
}

the load is working fine, but when i submit the form, it doesnt post! the post is done throught form action in php. Even the validation as html5 for required doesnt work. But if i load the page seperately, it works.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.