non credo sia possibile farlo con un linguaggio lato client.
dovresti usarne uno lato server tipo php, jsp o asp