Skip to main content

Posts

Showing posts from December, 2011

HTML <textarea> maxlength problem

We can limit the maximum characters in <input> with <maxlength> attribute. However it is not possible to do the same thing with <textarea> . This will be a problem if value of the <textarea> will be stored into database table and the length of the user input exceeds the field's length, either the value will be truncated or your database will throw an error to you.

Debugging php application with xdebug, netbeans and Google Chrome

Debugging PHP application is a pain. When we get problems, we often to use var_dump() or die() in various location to inspect the variables and then clean them again once the problem is solved. Fortunately, there is a piece of software called xdebug which can tremendously help us debugging php code. This article is about using xdebug in linux environment.

HTML <input> tips - 01

Beberapa tips yang berguna untuk penggunaan <input> pada html. Membatasi jumlah character maksimal yang boleh diinput. Gunakan attribute maxlength . Contoh: <html> <head> </head> <body> Input ini hanya dibatasi 5 character saja <input type="text" maxlength="5"> </body> </html>

Debug javascript dengan Google Chrome

Buat halaman html yang akan dibuat. Contoh: hapusaja.html <html> <head> </head> <body> <script type="text/javascript"> function Sajikan() { Sel = document.getElementById( "PILIHAN" ); alert( "Mangga dahar " + Sel.options[ Sel.selectedIndex].value ); } </script> Mau buah apa? <select id="PILIHAN" onclick="Sajikan()"> <option value="Gedhang">Pisang</option> <option value="Kates">Pepaya</option> <option value="Pelem">Mangga</option> </select> </body> </html>