• 09-04-2014, 22:14:28
    #1
    formda 1 buton var bu butona tıklandıgında textfield e veriyi nasıl ekliyebiliriz?


    <input type="text" name="textfield" id="textfield">
    <input type="button" name="button" id="button" value="Getir">
  • 09-04-2014, 22:23:35
    #2
    <input type="text" id="guvenlikkodu" />
    <input type="button" onclick='ChangeCode();' name="button" id="button" value="Getir">
    formdan veriyi aldıktan sonra bu şekilde ekleyebilirsin
    <script language="javascript">
    			function ChangeCode(){
    				document.getElementById('guvenlikkodu').value='asd';
    				return false;
    			}
    		</script>
  • 09-04-2014, 22:31:11
    #3
    buradaki çekmek istedigim veri sql tablosundaki bir alandı.
    sql veri cekme kısmını nasıl yaparız.
  • 09-04-2014, 22:41:58
    #4
    Kimlik doğrulama veya yönetimden onay bekliyor.
    @nurettin; butonun onclick eventına ajax olayı bağlayıp responseyi textfielde atabilirsin.
  • 09-04-2014, 22:53:55
    #5
    Developer
    <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
    <script type="text/javascript">
    $(function() {
        $('#button').click(function(){ // button tıklanacak button idsi
                $.get("fast.php", function( data ) { // fast.php datayi cekecegin sayfa
                    $('#textfield').val(data); //textfield yazdiracagin input id si
                });
        });
    });
    </script>
  • 10-04-2014, 08:51:44
    #6
    teşekkurler