• 10-04-2014, 20:57:29
    #1
    Merhaba arkadaslar.
    id post yapıyorum formda.
    Bunu yaparken de jquery'den yararlanıyorum.
    Fakat sorunum tamamen php ile ilgili.
    Neyse gelelim sadede
    id rakamlardan oluşuyorsa, id_post kolonuna sorunsuz insert yapıyor.
    Fakat id içinde bir tane harf bile geçiyorsa, malesef submit etmiyor formu.
    Kolon türü INT(20).
    Gerçi VARCHAR da denedim, hatta text bile ama sonuç aynı
    Sorun ne olabilir?
    Sabahtan beri çıldırmak üzereyim
  • 10-04-2014, 21:30:50
    #2
    Kimlik doğrulama veya yönetimden onay bekliyor.
    @sever2k7; konsoldan oluşan javascript hatalarını konuya ekleyebilir misin?

  • 10-04-2014, 21:38:23
    #3
    saintx adlı üyeden alıntı: mesajı görüntüle
    @sever2k7; konsoldan oluşan javascript hatalarını konuya ekleyebilir misin?

    Hemen efendim
    event.returnValue is deprecated. Please use the standard event.preventDefault() instead.
    Bu hatayı veriyor.
  • 10-04-2014, 21:45:41
    #4
    @sever2k7; yazdığın javascript kodunu da konuya ekleyebilir misiniz?
  • 10-04-2014, 21:51:04
    #5
    saintx adlı üyeden alıntı: mesajı görüntüle
    @sever2k7; yazdığın javascript kodunu da konuya ekleyebilir misiniz?
    Tabi ki
    <script type="text/javascript">
       $(function(){ 
    
            $('.new-com-bt').click(function(event){    
                $(this).hide();
                $('.new-com-cnt').show();
                $('#name-com').focus();
            });
    
    
            $('.the-new-com').bind('input propertychange', function() {
               $(".bt-add-com").css({opacity:0.6});
               var checklength = $(this).val().length;
               if(checklength){ $(".bt-add-com").css({opacity:1}); }
            });
    
    
            $('.bt-cancel-com').click(function(){
                $('.the-new-com').val('');
                $('.new-com-cnt').fadeOut('fast', function(){
                    $('.new-com-bt').fadeIn('fast');
                });
            });
    
    
            $('.bt-add-com').click(function(){
                var theCom = $('.the-new-com');
                var theName = $('#name-com');
                var theMail = $('#mail-com');
    
                if( !theCom.val()){ 
                    alert('Yorun alanı boş geçilemez!'); 
                }else{ 
                    $.ajax({
                        type: "POST",
                        url: "<?=BASE_URL?>/ajax/yorumekle.php",
                        data: 'act=add-com&id_post='+<?php echo $id_post; ?>+'&name='+theName.val()+'&email='+theMail.val()+'&comment='+theCom.val(),
                        success: function(html){
                            theCom.val('');
                            theMail.val('');
                            theName.val('');
                            $('.new-com-cnt').hide('fast', function(){
                                $('.new-com-bt').show('fast');
                                $('.new-com-bt').before(html);  
                            })
                        }  
                    });
                }
            });
    
        });
    </script>
  • 10-04-2014, 23:57:35
    #6
    @sever2k7; şu şekilde deneyebilir misin?

    <script type="text/javascript">
       $(function(){ 
    
            $('.new-com-bt').click(function(event){    
                $(this).hide();
                $('.new-com-cnt').show();
                $('#name-com').focus();
            });
    
    
            $('.the-new-com').bind('input propertychange', function() {
               $(".bt-add-com").css({opacity:0.6});
               var checklength = $(this).val().length;
               if(checklength){ $(".bt-add-com").css({opacity:1}); }
            });
    
    
            $('.bt-cancel-com').click(function(){
                $('.the-new-com').val('');
                $('.new-com-cnt').fadeOut('fast', function(){
                    $('.new-com-bt').fadeIn('fast');
                });
            });
    
    
            $('.bt-add-com').click(function(){
                var theCom = $('.the-new-com');
                var theName = $('#name-com');
                var theMail = $('#mail-com');
    
                if( !theCom.val()){ 
                    alert('Yorun alanı boş geçilemez!'); 
                }else{ 
                    $.ajax({
                        type: "POST",
                        url: "<?=BASE_URL?>/ajax/yorumekle.php",
                        data: 'act=add-com&id_post='+'<?php echo $id_post; ?>'+'&name='+theName.val()+'&email='+theMail.val()+'&comment='+theCom.val(),
                        success: function(html){
                            theCom.val('');
                            theMail.val('');
                            theName.val('');
                            $('.new-com-cnt').hide('fast', function(){
                                $('.new-com-bt').show('fast');
                                $('.new-com-bt').before(html);  
                            })
                        }  
                    });
                }
            });
    
        });
    </script>
  • 11-04-2014, 00:05:50
    #7
    saintx adlı üyeden alıntı: mesajı görüntüle
    @sever2k7; şu şekilde deneyebilir misin?

    <script type="text/javascript">
       $(function(){ 
    
            $('.new-com-bt').click(function(event){    
                $(this).hide();
                $('.new-com-cnt').show();
                $('#name-com').focus();
            });
    
    
            $('.the-new-com').bind('input propertychange', function() {
               $(".bt-add-com").css({opacity:0.6});
               var checklength = $(this).val().length;
               if(checklength){ $(".bt-add-com").css({opacity:1}); }
            });
    
    
            $('.bt-cancel-com').click(function(){
                $('.the-new-com').val('');
                $('.new-com-cnt').fadeOut('fast', function(){
                    $('.new-com-bt').fadeIn('fast');
                });
            });
    
    
            $('.bt-add-com').click(function(){
                var theCom = $('.the-new-com');
                var theName = $('#name-com');
                var theMail = $('#mail-com');
    
                if( !theCom.val()){ 
                    alert('Yorun alanı boş geçilemez!'); 
                }else{ 
                    $.ajax({
                        type: "POST",
                        url: "<?=BASE_URL?>/ajax/yorumekle.php",
                        data: 'act=add-com&id_post='+'<?php echo $id_post; ?>'+'&name='+theName.val()+'&email='+theMail.val()+'&comment='+theCom.val(),
                        success: function(html){
                            theCom.val('');
                            theMail.val('');
                            theName.val('');
                            $('.new-com-cnt').hide('fast', function(){
                                $('.new-com-bt').show('fast');
                                $('.new-com-bt').before(html);  
                            })
                        }  
                    });
                }
            });
    
        });
    </script>
    Bu kardeşimizin değerini bilelim arkadaşlar.
    Harikasın Ogün kardeşim.
    100. r10+ benden
    Kal sağlıcakla