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">