• 09-12-2013, 16:12:05
    #1
    Ajaxform ile post olarak dosya yukleme islemi yaptim yuklenen dosyanin ciktisini upprocess.php dosyasinda echo ile yaptim. En altta html ile form kisminida gosterdim. Ancak #resim id sininde yer alan input value degerini ajaxForm dan elde ettigim degerle degistirmek icin birkac sey denedim. Fakat olmadi bu konuda yardimci olabilir misiniz?
    $(document).ready(function() { 
    var options = { 
    type:'POST',
    url:'upprocess.php',
    clearForm: true ,
    target: '#htmlExampleTarget', 
    success: function() { 
    //$("#resim").val("#htmlExampleTarget");
    //$("#resim").val($("#resim").val());
    //var deger = $("#htmlExampleTarget").attr('value'); // orjinal nesnenin adını al
    //var html = '<input name="resim" value="'+ deger +'" id="resim" type="text">';
    //$("#resim").after(html).remove(); // önce yeniyi ekle, sonra eskiyi sil.
    //$('#htmlExampleTarget').fadeIn('slow'); 
    //$('#resim').replaceWith('<input name="resim" value="#htmlExampleTarget" id="resim" type="text">');
    }
    };
    $('#htmlForm').ajaxForm(options); 
    });
    <form id="htmlForm" enctype="multipart/form-data"> 
    <input type="file" name="image" />
    <input type="submit" name="submit" value="Yükle" /> 
    </form>
    Harici input: <input name="resim" value="" id="resim" type="text">
  • 10-12-2013, 12:59:45
    #2
    Arkadaslar yardimci olabilecek kimse yok mu?


    Tapatalk 2 den gönderilmiştir.
  • 10-12-2013, 13:32:04
    #3
    geri dönen sonucu idisi resim olan inputun valuesine yazdırmak mı istiyorsunuz?Eğer yapmaya çalıştığınız buysa:

    $(document).ready(function() { 
    var options = { 
    type:'POST',
    url:'upprocess.php',
    clearForm: true ,
    target: '#htmlExampleTarget', 
    success: function(sonuc) { 
    $('#resim').val(sonuc);
    
    
    }
    };
    $('#htmlForm').ajaxForm(options); 
    });
  • 10-12-2013, 15:50:21
    #4
    çok teşekkürler işime yaradı ve çalıştı.