Active7 years, 1 month ago
Selamat malam,, saya sajikan lagi cara menginsert file upload dengan mysqli,,, simpel and gamfang,, php include './konek. Contoh Aplikasi Pengelolaan Persediaan Barang dengan PHP & MySQL. 06 Mar 2012 ozs PHP & MySQL, 170. Sudah lama rasanya tidak mem-posting contoh scipt php dan mysql, selama ini masih terbuai oleh linux ubuntu yang bersarang di Netbook kesayangan.
I am newbie on ajax. My case is, i want to passing value on same page so if i click on selected the value pass to upper
on my pure php code like this
here are the problems is i wanted using ajax so when i click selected on table.The value passing on top without loading.Thanks Sony vaio pcg-71211m touchpad driver.
BrianS9,48733 gold badges4040 silver badges101101 bronze badges
Yan SusantoYan Susanto
1 Answer
You don't need to use AJAX as you don't have to load the data from an external file. You can just use some javascript to populate the form. There are more efficient ways to do it then the code below, but here's a quick and dirty answer..
Program Stock Barang Php Include Not Working
Oh, and I did the javascript in jquery because it makes things easier. But the same can be done in pure javascript.
For your HTML/PHP code, change the a tag to use onclick instead of href, and call a javascript function:
Then, create a javascript function on the same page that looks like this:
Program Stock Barang Php Include File
If you don't want to use jquery, I think the equivalent of $('#id').val(id) is document.getElementById('id').value = id;
shadyhillshadyhill
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.