Friday, March 27, 2009

Never let you computers on public IPs with stupid passwords

The worst thing ever happend in near future for me happend today. Just got a public server to install the tools that i have developed. And i have just put a password which is very simple, actually the worlds simplest password for the root. :D. Unfortunately in a less than one day the server been hacked and the problems that it had made are still on investigation. :(. Feels so bad about it.

Remember to put a very long and secured password for a any computer or a server which is publicly opened :).

Thursday, March 12, 2009

Adding a Row Dynamically to a HTML Table using JavaScript

The following code part can be used to add a new row and a cell to a html table dynamically using javascript.
var tbl = document.getElementById('table_id');
var lastRow = tbl.rows.length;
// this adds the row to the end of the table
var row = tbl.insertRow(lastRow);
var cell1 = row.insertCell(0);
var textNode = document.createTextNode("Hello World");
cell1.appendChild(textNode); 
by creating set of cells you can append to the row which you have created.